diff --git a/init.lua b/init.lua index 30809b6..9054fac 100644 --- a/init.lua +++ b/init.lua @@ -1,8 +1,6 @@ local S = minetest.get_translator(minetest.get_current_modname()) -local S = minetest.get_translator(minetest.get_current_modname()) - local boat_visual_size = {x = 1, y = 1, z = 1} local paddling_speed = 22 local boat_y_offset = 0.35 @@ -105,8 +103,12 @@ local function detach_object(obj, change_pos) obj:get_luaentity()._old_visual_size = nil end if change_pos then - obj:set_pos(vector.add(obj:get_pos(), vector.new(0, 0.2, 0))) + obj:set_pos(vector.add(obj:get_pos(), vector.new(0, 0.2, 0))) end + obj:set_pos(vector.add(obj:get_pos(), vector.new(0, 0.5, 0))) + minetest.after(0.01, function(obj, change_pos) + obj:set_pos(vector.add(obj:get_pos(), vector.new(0, 0.5, 0))) + end, obj, change_pos) end -- @@ -118,11 +120,15 @@ local boat = { pointable = true, -- Warning: Do not change the position of the collisionbox top surface, -- lowering it causes the boat to fall through the world if underwater - collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5}, + -- collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5}, + collisionbox = {-0.6, -0.2, -1.6, 0.6, 0.3, 0.6}, selectionbox = {-0.7, -0.35, -0.7, 0.7, 0.3, 0.7}, visual = "mesh", mesh = "sum_airship_boat.b3d", - textures = {"sum_airship_texture_oak_boat.png", "sum_airship_texture_oak_boat.png", "sum_airship_texture_oak_boat.png", "sum_airship_texture_oak_boat.png", "sum_airship_texture_oak_boat.png"}, + textures = {"sum_airship_texture_oak_boat.png"}, + animations = { + idle = {x= 0, y= 7}, + }, visual_size = boat_visual_size, hp_max = boat_max_hp, damage_texture_modifier = "^[colorize:white:0", @@ -150,6 +156,7 @@ end function boat.on_activate(self, staticdata, dtime_s) self.object:set_armor_groups({fleshy = 100}) + self.object:set_animation({x = 0, y = 7}, 25) local data = minetest.deserialize(staticdata) if type(data) == "table" then self._v = data.v @@ -341,7 +348,7 @@ function boat.on_step(self, dtime, moveresult) end local v = self.object:get_velocity() - v = vector.multiply(v, 0.97) + v = vector.multiply(v, 0.98) self.object:set_velocity(v) end diff --git a/models/airship_boat.blend b/models/airship_boat.blend deleted file mode 100644 index 2b4af25..0000000 Binary files a/models/airship_boat.blend and /dev/null differ diff --git a/models/airship_boat.blend1 b/models/airship_boat.blend1 deleted file mode 100644 index b8570bd..0000000 Binary files a/models/airship_boat.blend1 and /dev/null differ diff --git a/models/sum_airship_boat.b3d b/models/sum_airship_boat.b3d index 620c4de..ac79d12 100644 Binary files a/models/sum_airship_boat.b3d and b/models/sum_airship_boat.b3d differ diff --git a/models/sum_airship_boat.blend b/models/sum_airship_boat.blend index 742ab82..53f076b 100644 Binary files a/models/sum_airship_boat.blend and b/models/sum_airship_boat.blend differ diff --git a/models/sum_airship_boat.blend1 b/models/sum_airship_boat.blend1 index df0fff6..e523ee3 100644 Binary files a/models/sum_airship_boat.blend1 and b/models/sum_airship_boat.blend1 differ diff --git a/textures/canvas.png b/textures/canvas.png new file mode 100644 index 0000000..bd0e642 Binary files /dev/null and b/textures/canvas.png differ diff --git a/textures/sum_airship_texture_oak_boat.png b/textures/sum_airship_texture_oak_boat.png index 6cbfded..1cf3cf7 100644 Binary files a/textures/sum_airship_texture_oak_boat.png and b/textures/sum_airship_texture_oak_boat.png differ