summaryrefslogtreecommitdiff
path: root/src/entity.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/entity.c')
-rw-r--r--src/entity.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/entity.c b/src/entity.c
index 75ad7ec..07bea1e 100644
--- a/src/entity.c
+++ b/src/entity.c
@@ -47,7 +47,7 @@ Entity *
entity_place_meeting(Entity *this, struct Game *g, unsigned int type)
{
for (__auto_type i = 0; i < MAX_ENTITIES; i++)
- if (this != &g->entities[i] && g->entities[i].type == type &&
+ if (this != &g->entities[i] && (type == -1u || g->entities[i].type == type) &&
entity_meet(this, &g->entities[i]))
return &g->entities[i];
return NULL;