diff --git a/entities.lua b/entities.lua index e2d9da2..bf0487f 100755 --- a/entities.lua +++ b/entities.lua @@ -185,6 +185,7 @@ minetest.register_entity('ap_airship:control_interactor',{ textures = {"ap_airship_alpha.png",}, }, dist_moved = 0, + max_hp = 65535, on_activate = function(self,std) self.sdata = minetest.deserialize(std) or {} @@ -217,6 +218,7 @@ minetest.register_entity('ap_airship:cabin_interactor',{ textures = {"ap_airship_alpha.png",}, }, dist_moved = 0, + max_hp = 65535, on_activate = function(self,std) self.sdata = minetest.deserialize(std) or {} diff --git a/models/ap_airship_mesh.b3d b/models/ap_airship_mesh.b3d index 10b8f4a..0838621 100755 Binary files a/models/ap_airship_mesh.b3d and b/models/ap_airship_mesh.b3d differ diff --git a/textures/blimp_clover.png b/textures/ap_airship_clover.png similarity index 100% rename from textures/blimp_clover.png rename to textures/ap_airship_clover.png diff --git a/textures/blimp_jack.png b/textures/ap_airship_jack.png similarity index 100% rename from textures/blimp_jack.png rename to textures/ap_airship_jack.png diff --git a/textures/blimp_liz.png b/textures/ap_airship_liz.png similarity index 100% rename from textures/blimp_liz.png rename to textures/ap_airship_liz.png diff --git a/textures/blimp_shotting_star.png b/textures/ap_airship_shotting_star.png similarity index 100% rename from textures/blimp_shotting_star.png rename to textures/ap_airship_shotting_star.png diff --git a/textures/blimp_skull.png b/textures/ap_airship_skull.png similarity index 100% rename from textures/blimp_skull.png rename to textures/ap_airship_skull.png diff --git a/utilities.lua b/utilities.lua index 42c1a38..d431315 100755 --- a/utilities.lua +++ b/utilities.lua @@ -98,7 +98,7 @@ function ap_airship.rescueConnectionFailedPassengers(self) if player then --we have a player! if player_api.player_attached[self._passengers[i]] == nil then --but isn't attached? --minetest.chat_send_all("okay") - if player:get_hp() > 0 then + if player:get_hp() >= 0 then self._passengers[i] = nil --clear the slot first do_attach(self, player, i) --attach else @@ -114,10 +114,10 @@ end -- attach passenger function ap_airship.attach_pax(self, player, slot) slot = slot or 0 + local name = player:get_player_name() --verify if is locked to non-owners if self._passengers_locked == true then - local name = player:get_player_name() local can_bypass = minetest.check_player_privs(player, {protection_bypass=true}) local is_shared = false if name == self.owner or can_bypass then is_shared = true end @@ -156,6 +156,11 @@ function ap_airship.attach_pax(self, player, slot) i = t[k] if self._passengers[i] == nil then do_attach(self, player, i) + if name == self.owner then + --put the owner on cabin directly + self._passengers_base_pos[i] = {x=0,y=-29,z=150} + self._passengers_base[i]:set_attach(self.object,'',self._passengers_base_pos[i],{x=0,y=0,z=0}) + end break end end diff --git a/walk_map.lua b/walk_map.lua index 0dad351..01a1116 100644 --- a/walk_map.lua +++ b/walk_map.lua @@ -42,12 +42,13 @@ local function is_obstacle_zone(pos, start_point, end_point) return retVal end - if pos.z < max_z and pos.z > min_z+mid_z and + local death_zone = 1.5 --to avoid the "slip" when colliding in y direction + if pos.z < max_z + death_zone and pos.z > min_z+mid_z and pos.x > min_x and pos.x < max_x then retVal.z = max_z + 1 return retVal end - if pos.z > min_z and pos.z <= min_z+mid_z and + if pos.z > min_z - death_zone and pos.z <= min_z+mid_z and pos.x > min_x and pos.x < max_x then retVal.z = min_z - 1 return retVal @@ -66,7 +67,6 @@ function ap_airship.cabin_map(pos, dpos) new_pos = is_obstacle_zone(new_pos, {x=12, z=140}, {x=2.5, z=130}) new_pos = is_obstacle_zone(new_pos, {x=-12, z=140}, {x=-2.5, z=130}) new_pos = is_obstacle_zone(new_pos, {x=12, z=127}, {x=2.5, z=117}) - new_pos = is_obstacle_zone(new_pos, {x=-12, z=127}, {x=-2.5, z=117}) --limit to the cabin new_pos.z = ap_airship.clamp(new_pos.z, 112, 164) @@ -120,7 +120,7 @@ function ap_airship.ladder_map(pos, dpos) local orig_pos = ap_airship.copy_vector(pos) local position = ap_airship.copy_vector(dpos) local new_pos = ap_airship.copy_vector(dpos) - new_pos.z = ap_airship.clamp(new_pos.z, 112, 118) + new_pos.z = ap_airship.clamp(new_pos.z, 112, 117) new_pos.x = ap_airship.clamp(new_pos.x, -8.42, -2) return new_pos