From 36a95838d17ffaee4020a2aba832af6636591df4 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Thu, 14 Dec 2017 17:13:36 +0100 Subject: Rework collision masks and improve AI. --- src/world.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/world.cpp') diff --git a/src/world.cpp b/src/world.cpp index 71a7ae7..8a7720c 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -106,6 +106,9 @@ bool world_t::find_path(v2f_t src, v2f_t dst, cmodel_t *cmodel, entity_t *ignore if (ent == ignore) continue; + if (!(ent->cmodel.cflags & cmodel->cflags)) + continue; + center = ent->cmodel.bounds.center(); combined_dims = ent->cmodel.bounds.dims() + cmodel_dims; combined[0] = center - combined_dims / 2; -- cgit