From: Christian Heller Date: Sat, 16 Aug 2014 02:31:10 +0000 (+0200) Subject: Server/AI: Fix bug in standing-on-consumable test. X-Git-Tag: tce~662 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7Bdb.prefix%7D%7D/feed.xml?a=commitdiff_plain;h=22ab49928288775acfd1224eeb8b8014158efd92;p=plomrogue Server/AI: Fix bug in standing-on-consumable test. --- diff --git a/src/server/ai.c b/src/server/ai.c index b8850a8..d536f14 100644 --- a/src/server/ai.c +++ b/src/server/ai.c @@ -224,7 +224,8 @@ static uint8_t standing_on_consumable(struct Thing * t_standing) struct Thing * t = world.things; for (; t != NULL; t = t->next) { - if (t->pos.y == t_standing->pos.y && t->pos.x && t_standing->pos.x) + if ( t_standing != t + && t->pos.y == t_standing->pos.y && t->pos.x == t_standing->pos.x) { struct ThingType * tt = get_thing_type(t->type); if (tt->consumable)