summaryrefslogtreecommitdiff
path: root/src/world.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-14 17:13:36 +0100
committerPaweł Redman <pawel.redman@gmail.com>2017-12-14 17:23:35 +0100
commit36a95838d17ffaee4020a2aba832af6636591df4 (patch)
tree8853eb8623970201d009a4a4637e5451c9103f8c /src/world.cpp
parentd376eb30b8363f712e3a0bbc04ea584547c09e65 (diff)
Rework collision masks and improve AI.
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp3
1 files changed, 3 insertions, 0 deletions
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;