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
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
pos_x = math.sin(yaw) * -hip
pos_z = math.cos(yaw) * hip
local pos_x = math.sin(yaw) * -hip
local pos_z = math.cos(yaw) * hip
obj_pos.x = pos.x + pos_x
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
self.object:set_properties(props)
end
if self.isonground and props.show_on_minimap then
if self.isonground and props.show_on_minimap then
props.show_on_minimap = false
self.object:set_properties(props)
end
@ -150,7 +150,7 @@ function airutils.on_step(self,dtime,colinfo)
end
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
-- Estado atual do sistema
@ -621,7 +621,7 @@ local function damage_vehicle(self, toolcaps, ttime, damage)
if (not toolcaps) then
return
end
value = toolcaps.damage_groups.fleshy or 0
local value = toolcaps.damage_groups.fleshy or 0
if (toolcaps.damage_groups.vehicle) then
value = toolcaps.damage_groups.vehicle
end