master #5

Merged
epCode merged 255 commits from VoxeLibre/VoxeLibre:master into master 2021-02-02 23:20:01 +01:00
1 changed files with 10 additions and 4 deletions
Showing only changes of commit 507f2d872b - Show all commits

View File

@ -59,6 +59,15 @@ local boat = {
_animation = 0, -- 0: not animated; 1: paddling forwards; -1: paddling forwards _animation = 0, -- 0: not animated; 1: paddling forwards; -1: paddling forwards
} }
local function detach_player(player)
player:set_detach()
player:set_properties({visual_size = {x=1, y=1}})
mcl_player.player_attached[player:get_player_name()] = false
mcl_player.player_set_animation(player, "stand" , 30)
end
minetest.register_on_respawnplayer(detach_player)
function boat.on_rightclick(self, clicker) function boat.on_rightclick(self, clicker)
if not clicker or not clicker:is_player() then if not clicker or not clicker:is_player() then
return return
@ -66,10 +75,7 @@ function boat.on_rightclick(self, clicker)
local name = clicker:get_player_name() local name = clicker:get_player_name()
if self._driver and clicker == self._driver then if self._driver and clicker == self._driver then
self._driver = nil self._driver = nil
clicker:set_detach() detach_player(clicker)
clicker:set_properties({visual_size = {x=1, y=1}})
mcl_player.player_attached[name] = false
mcl_player.player_set_animation(clicker, "stand" , 30)
local pos = clicker:get_pos() local pos = clicker:get_pos()
pos = {x = pos.x, y = pos.y + 0.2, z = pos.z} pos = {x = pos.x, y = pos.y + 0.2, z = pos.z}
clicker:set_pos(pos) clicker:set_pos(pos)