aboutsummaryrefslogtreecommitdiff
path: root/animation_system.c
diff options
context:
space:
mode:
Diffstat (limited to 'animation_system.c')
-rw-r--r--animation_system.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/animation_system.c b/animation_system.c
index 22317ac..8411e64 100644
--- a/animation_system.c
+++ b/animation_system.c
@@ -23,6 +23,11 @@ void animation_system(World* world) {
}
if (animated->frame >= animation->frame_count) {
+ if (bits & ctype_destroy_on_anim_done) {
+ destroy_entity(world, i);
+ continue;
+ }
+
animated->frame = 0;
animated->timer = 0;
}