mirror of
https://github.com/APercy/airutils.git
synced 2025-03-23 03:12:20 +00:00
fix nan hp
This commit is contained in:
parent
3a8475ea8c
commit
a81abe7ae5
1 changed files with 1 additions and 1 deletions
2
init.lua
2
init.lua
|
@ -107,7 +107,7 @@ end
|
||||||
function airutils.setText(self, vehicle_name)
|
function airutils.setText(self, vehicle_name)
|
||||||
local properties = self.object:get_properties()
|
local properties = self.object:get_properties()
|
||||||
local formatted = ""
|
local formatted = ""
|
||||||
if type( self.hp_max ) != "number" then self.hp_max = 0.1 end --strange error when hpmax is NaN
|
if type(self.hp_max) ~= "number" then self.hp_max = 0.1 end --strange error when hpmax is NaN
|
||||||
if self.hp_max then
|
if self.hp_max then
|
||||||
formatted = " Current hp: " .. string.format(
|
formatted = " Current hp: " .. string.format(
|
||||||
"%.2f", self.hp_max
|
"%.2f", self.hp_max
|
||||||
|
|
Loading…
Add table
Reference in a new issue