fix non existent variables

This commit is contained in:
Alexsandro Percy 2024-03-10 11:24:40 -03:00
parent 97abe243d3
commit c06bda3fcc
3 changed files with 4 additions and 3 deletions

View file

@ -24,7 +24,7 @@ function airutils.physics(self)
if surface then -- standing in liquid if surface then -- standing in liquid
self.isinliquid = true self.isinliquid = true
end end
local last_accel = new local last_accel = vector.new()
if self._last_accel then if self._last_accel then
last_accel = vector.new(self._last_accel) last_accel = vector.new(self._last_accel)
end end

View file

@ -304,7 +304,7 @@ function airutils.logic(self)
--special routine for automated plane --special routine for automated plane
if extern_ent then if extern_ent then
if not extern_ent.on_rightclick then if not extern_ent.on_rightclick then
local touch_point = self.initial_properties.collisionbox[2]-0.5 local touch_point = (self.initial_properties.collisionbox[2])-0.5
local node_bellow = airutils.nodeatpos(airutils.pos_shift(curr_pos,{y=touch_point})) local node_bellow = airutils.nodeatpos(airutils.pos_shift(curr_pos,{y=touch_point}))
--minetest.chat_send_all(dump(node_bellow.drawtype)) --minetest.chat_send_all(dump(node_bellow.drawtype))
if (node_bellow and node_bellow.drawtype ~= 'airlike') then if (node_bellow and node_bellow.drawtype ~= 'airlike') then

View file

@ -187,7 +187,7 @@ function airutils.attach_pax(self, player, is_copilot)
return return
end end
t = {} -- new array local t = {} -- new array
for i=1, max_seats - crew do --(the first are for the crew for i=1, max_seats - crew do --(the first are for the crew
t[i] = i t[i] = i
end end
@ -199,6 +199,7 @@ function airutils.attach_pax(self, player, is_copilot)
end end
--for i = 1,10,1 do --for i = 1,10,1 do
local i = 0
for k,v in ipairs(t) do for k,v in ipairs(t) do
i = t[k] + crew --jump the crew seats i = t[k] + crew --jump the crew seats
if self._passengers[i] == nil then if self._passengers[i] == nil then