summaryrefslogtreecommitdiff
path: root/src/entity.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/entity.c')
-rw-r--r--src/entity.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/entity.c b/src/entity.c
index 8fdaa9e..00e6719 100644
--- a/src/entity.c
+++ b/src/entity.c
@@ -20,7 +20,7 @@ unsigned int
entity_type(const char *type)
{
for (unsigned int i = 0; i < num_entitytags; i++)
- if (strcmp(type, entitytags[i]) == 0)
+ if (strcmp(type, entitytags[i].name) == 0)
return i + 1;
fprintf(stderr, "unknown type '%s'\n", type);
return 0;
@@ -100,5 +100,5 @@ entity_move(Entity *this, Game *g)
Entity *
entity_init(Entity *this, unsigned int type, int x, int y)
{
- return entityinits[type - 1](this, x, y);
+ return entitytags[type - 1].init(this, x, y);
}