forked from minetest-mods/playeranim
Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev
This commit is contained in:
commit
0b6bbe47e6
11
init.lua
11
init.lua
@ -20,6 +20,17 @@ if not get_animation then
|
|||||||
error("player_api.get_animation or default.player_get_animation is not found")
|
error("player_api.get_animation or default.player_get_animation is not found")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- stop player_api from messing stuff up (since 5.3)
|
||||||
|
if minetest.global_exists("player_api") then
|
||||||
|
for _, v in pairs(player_api.registered_models["character.b3d"].animations) do
|
||||||
|
v.x = 0
|
||||||
|
v.y = 0
|
||||||
|
end
|
||||||
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
player:set_local_animation(nil, nil, nil, nil, 0)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
local function get_animation_speed(player)
|
local function get_animation_speed(player)
|
||||||
if player:get_player_control().sneak then
|
if player:get_player_control().sneak then
|
||||||
return ANIMATION_SPEED_SNEAK
|
return ANIMATION_SPEED_SNEAK
|
||||||
|
Loading…
Reference in New Issue
Block a user