diff --git a/entities.lua b/entities.lua index a8a0d52..4a81774 100755 --- a/entities.lua +++ b/entities.lua @@ -204,7 +204,7 @@ local function right_click_chair(self, clicker) if index > 0 then local chair_index = find_chair_index(ship_self, self.object) --minetest.chat_send_all("index: "..chair_index) - if ship_self._passenger_is_sit[index] ==0 and chair_index then + if ship_self._passenger_is_sit[index] == 0 and chair_index then local dest_pos = ship_self._chairs_pos[chair_index] if dest_pos then dest_pos.y = dest_pos.y diff --git a/utilities.lua b/utilities.lua index 84373f1..939e9bf 100755 --- a/utilities.lua +++ b/utilities.lua @@ -68,6 +68,7 @@ local function do_attach(self, player, slot) self._passengers[slot] = name player:set_attach(self._passengers_base[slot], "", {x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0}) player_api.player_attached[name] = true + self._passenger_is_sit[slot] = 0 end end