diff --git a/src/battle/items.c b/src/battle/items.c index 56055f8..90e1099 100644 --- a/src/battle/items.c +++ b/src/battle/items.c @@ -71,6 +71,8 @@ Entity *spawnItem(char *name) memcpy(item, def, sizeof(Entity)); + item->next = NULL; + item->action = action; return item; @@ -91,8 +93,11 @@ void addRandomItem(int x, int y) } item = spawnEntity(); + memcpy(item, def, sizeof(Entity)); + item->next = NULL; + item->x = x; item->y = y; item->speed = 1;