Tweak building health, fix damage dealing

This commit is contained in:
2024-02-13 11:10:48 +01:00
parent 02a418957e
commit 0c97ba6511
3 changed files with 8 additions and 6 deletions

View File

@@ -67,7 +67,7 @@ void damageEvent(ecs_entity_t entity, DamageEvent event) {
ecs_remove(ECS, entity, Health);
ecs_remove(ECS, entity, Unit);
ecs_remove(ECS, entity, Building);
} else {
} else if (health->hp <= 0){
// No animation, delete right away
ecs_delete(ECS, entity);
}