home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eff209c
)
Server/AI: Fix bug in standing-on-consumable test.
author
Christian Heller
<c.heller@plomlompom.de>
Sat, 16 Aug 2014 02:31:10 +0000
(
04:31
+0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Sat, 16 Aug 2014 02:31:10 +0000
(
04:31
+0200)
src/server/ai.c
patch
|
blob
|
history
diff --git
a/src/server/ai.c
b/src/server/ai.c
index b8850a8155c6772b6d7e0ae279430e88b432fe31..d536f14e2f629c5f131d9a3b1dc6e2142152206e 100644
(file)
--- 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)