From 49c47f53300a20d8e88e26919612f4162924d53e Mon Sep 17 00:00:00 2001 From: Ruslan Ignatov Date: Tue, 11 Nov 2025 13:01:36 +0300 Subject: [PATCH] Fixed ship duplication --- game/health_system/health.gd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/game/health_system/health.gd b/game/health_system/health.gd index ac515f2..91ab727 100644 --- a/game/health_system/health.gd +++ b/game/health_system/health.gd @@ -23,6 +23,8 @@ func apply_damage(damage: AbstractDamage) -> void: var damage_value := ceili(damage.value * damage.armor_damage_multiplier()) _armor = max(_armor - damage_value, 0) else: + if _hull == 0: return + var damage_value := ceili(damage.value * damage.hull_damage_multiplier()) _hull = max(_hull - damage_value, 0)