diff options
Diffstat (limited to 'src/entity.c')
| -rw-r--r-- | src/entity.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/entity.c b/src/entity.c index 2565d3b..4cd13d4 100644 --- a/src/entity.c +++ b/src/entity.c @@ -162,6 +162,7 @@ Entity createEntity(EntityId id, Vector3 position) { Entity entity; entity.id = id; + entity.visable = true; entity.data = NULL; // Run init callback. @@ -187,7 +188,7 @@ void updateEntity(Entity* entity, Game* game) UpdateEntityCallback updateCallback = entityEntries[entity->id].updateCallback; - if (updateCallback != NULL) + if (entity->visable && updateCallback != NULL) { updateCallback(entity, game); } |
