aboutsummaryrefslogtreecommitdiff
path: root/world.c
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2023-05-07 09:37:45 +1000
committerquou <quou@disroot.org>2023-05-07 09:37:45 +1000
commit40eb179043b77f011fb1048c386ee187f64569d0 (patch)
treeebae794ec0b3b8851b8c29119ada06555f49d4b6 /world.c
parent47e7976922f5c17505c7c5a3377c3735649e3dcc (diff)
Add waves and some more polish.
Diffstat (limited to 'world.c')
-rw-r--r--world.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/world.c b/world.c
index 4995351..3ee369d 100644
--- a/world.c
+++ b/world.c
@@ -36,6 +36,9 @@ Entity new_entity(World* world) {
void destroy_entity(World* world, Entity e) {
world->recycle_bin[world->recycle_bin_count++] = e;
+ if (world->bitmask[e] & ctype_enemy) {
+ world->enemy_count--;
+ }
world->bitmask[e] = 0;
world->gmemory++;
}