From 27e140ae6d57d6cb93c2d01f9fd5f9d0f04ae8a8 Mon Sep 17 00:00:00 2001 From: Alexsandro Percy Date: Fri, 31 Jan 2025 20:58:06 -0300 Subject: [PATCH] validation plane hp bellow 0 --- lib_planes/entities.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_planes/entities.lua b/lib_planes/entities.lua index 1dd3872..1befbeb 100644 --- a/lib_planes/entities.lua +++ b/lib_planes/entities.lua @@ -701,6 +701,7 @@ local function damage_vehicle(self, toolcaps, ttime, damage) end damage = damage + value / 10 self.hp_max = self.hp_max - damage + if self.hp_max < 0 then self.hp_max = 0 end airutils.setText(self, self._vehicle_name) end