diff --git a/lib_planes/custom_physics.lua b/lib_planes/custom_physics.lua index a4de38a..34c887e 100755 --- a/lib_planes/custom_physics.lua +++ b/lib_planes/custom_physics.lua @@ -24,7 +24,7 @@ function airutils.physics(self) if surface then -- standing in liquid self.isinliquid = true end - local last_accel = new + local last_accel = vector.new() if self._last_accel then last_accel = vector.new(self._last_accel) end diff --git a/lib_planes/entities.lua b/lib_planes/entities.lua index 41f6730..6ac4f90 100644 --- a/lib_planes/entities.lua +++ b/lib_planes/entities.lua @@ -304,7 +304,7 @@ function airutils.logic(self) --special routine for automated plane if extern_ent 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})) --minetest.chat_send_all(dump(node_bellow.drawtype)) if (node_bellow and node_bellow.drawtype ~= 'airlike') then diff --git a/lib_planes/utilities.lua b/lib_planes/utilities.lua index a5f17cd..12cff6e 100644 --- a/lib_planes/utilities.lua +++ b/lib_planes/utilities.lua @@ -187,7 +187,7 @@ function airutils.attach_pax(self, player, is_copilot) return end - t = {} -- new array + local t = {} -- new array for i=1, max_seats - crew do --(the first are for the crew t[i] = i end @@ -199,6 +199,7 @@ function airutils.attach_pax(self, player, is_copilot) end --for i = 1,10,1 do + local i = 0 for k,v in ipairs(t) do i = t[k] + crew --jump the crew seats if self._passengers[i] == nil then