mirror of
https://github.com/ElCeejo/animalia.git
synced 2025-03-21 15:21:22 +00:00
Fix mounted animation compat with 3d armor
This commit is contained in:
parent
9d6f242871
commit
2ca9681514
1 changed files with 6 additions and 3 deletions
|
@ -513,6 +513,7 @@ function animalia.mount(self, player, params)
|
||||||
if not creatura.is_alive(player) then
|
if not creatura.is_alive(player) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local plyr_name = player:get_player_name()
|
||||||
if (player:get_attach()
|
if (player:get_attach()
|
||||||
and player:get_attach() == self.object)
|
and player:get_attach() == self.object)
|
||||||
or not params then
|
or not params then
|
||||||
|
@ -527,20 +528,22 @@ function animalia.mount(self, player, params)
|
||||||
if minetest.get_modpath("player_api") then
|
if minetest.get_modpath("player_api") then
|
||||||
animate_player(player, "stand", 30)
|
animate_player(player, "stand", 30)
|
||||||
if player_api.player_attached then
|
if player_api.player_attached then
|
||||||
player_api.player_attached[player:get_player_name()] = false
|
player_api.player_attached[plyr_name] = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self.rider = nil
|
self.rider = nil
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if minetest.get_modpath("player_api") then
|
if minetest.get_modpath("player_api") then
|
||||||
player_api.player_attached[player:get_player_name()] = true
|
player_api.player_attached[plyr_name] = true
|
||||||
animate_player(player, "sit", 30)
|
|
||||||
end
|
end
|
||||||
self.rider = player
|
self.rider = player
|
||||||
player:set_attach(self.object, "Torso", params.pos, params.rot)
|
player:set_attach(self.object, "Torso", params.pos, params.rot)
|
||||||
player:set_eye_offset({x = 0, y = 25, z = 0}, {x = 0, y = 15, z = 15})
|
player:set_eye_offset({x = 0, y = 25, z = 0}, {x = 0, y = 15, z = 15})
|
||||||
self:clear_utility()
|
self:clear_utility()
|
||||||
|
minetest.after(0.3, function()
|
||||||
|
animate_player(player, "sit" , 30)
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
|
Loading…
Add table
Reference in a new issue