fixing undeclared variables

This commit is contained in:
Alexsandro Percy 2023-11-08 18:49:53 -03:00
parent b23ed3890b
commit 8d97207749
2 changed files with 5 additions and 5 deletions

View file

@ -9,8 +9,8 @@ function airutils.move_target(player, pointed_thing)
if object then if object then
local obj_pos = object:get_pos() local obj_pos = object:get_pos()
local hip = math.sqrt(math.pow(obj_pos.x - pos.x,2)+math.pow(obj_pos.z - pos.z,2)) + 1 local hip = math.sqrt(math.pow(obj_pos.x - pos.x,2)+math.pow(obj_pos.z - pos.z,2)) + 1
pos_x = math.sin(yaw) * -hip local pos_x = math.sin(yaw) * -hip
pos_z = math.cos(yaw) * hip local pos_z = math.cos(yaw) * hip
obj_pos.x = pos.x + pos_x obj_pos.x = pos.x + pos_x
obj_pos.z = pos.z + pos_z obj_pos.z = pos.z + pos_z

View file

@ -120,7 +120,7 @@ function airutils.on_step(self,dtime,colinfo)
props.show_on_minimap = true props.show_on_minimap = true
self.object:set_properties(props) self.object:set_properties(props)
end end
if self.isonground and props.show_on_minimap then if self.isonground and props.show_on_minimap then
props.show_on_minimap = false props.show_on_minimap = false
self.object:set_properties(props) self.object:set_properties(props)
end end
@ -150,7 +150,7 @@ function airutils.on_step(self,dtime,colinfo)
end end
local function ground_pitch(self, longit_speed, curr_pitch) local function ground_pitch(self, longit_speed, curr_pitch)
newpitch = curr_pitch local newpitch = curr_pitch
if self._last_longit_speed == nil then self._last_longit_speed = 0 end if self._last_longit_speed == nil then self._last_longit_speed = 0 end
-- Estado atual do sistema -- Estado atual do sistema
@ -621,7 +621,7 @@ local function damage_vehicle(self, toolcaps, ttime, damage)
if (not toolcaps) then if (not toolcaps) then
return return
end end
value = toolcaps.damage_groups.fleshy or 0 local value = toolcaps.damage_groups.fleshy or 0
if (toolcaps.damage_groups.vehicle) then if (toolcaps.damage_groups.vehicle) then
value = toolcaps.damage_groups.vehicle value = toolcaps.damage_groups.vehicle
end end