X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=src%2Fserver%2Fai.c;h=d536f14e2f629c5f131d9a3b1dc6e2142152206e;hb=22ab49928288775acfd1224eeb8b8014158efd92;hp=b8850a8155c6772b6d7e0ae279430e88b432fe31;hpb=eff209c8fe5a74ba54efae4fbc58875dc6fabbf1;p=plomrogue 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)