validation plane hp bellow 0

This commit is contained in:
Alexsandro Percy 2025-01-31 20:58:06 -03:00
parent a6e40eb557
commit 27e140ae6d

View file

@ -701,6 +701,7 @@ local function damage_vehicle(self, toolcaps, ttime, damage)
end end
damage = damage + value / 10 damage = damage + value / 10
self.hp_max = self.hp_max - damage self.hp_max = self.hp_max - damage
if self.hp_max < 0 then self.hp_max = 0 end
airutils.setText(self, self._vehicle_name) airutils.setText(self, self._vehicle_name)
end end