From f997944e372cc3915d79bfc31e71c40de0236065 Mon Sep 17 00:00:00 2001 From: Alexsandro Percy Date: Fri, 27 Oct 2023 19:48:30 -0300 Subject: [PATCH] fix nan hp --- lib_planes/entities.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_planes/entities.lua b/lib_planes/entities.lua index a32029e..cbd7730 100644 --- a/lib_planes/entities.lua +++ b/lib_planes/entities.lua @@ -110,6 +110,7 @@ function airutils.on_step(self,dtime,colinfo) local vel = self.object:get_velocity() local pos = self.object:get_pos() local props = self.object:get_properties() + if type( self.hp_max ) != "number" then self.hp_max = 0.1 end --strange error when hpmax is NaN -- handle visibility on radar if (pos and pos.y < airutils.radarMinHeight and props.show_on_minimap) then