Skip to content

Commit

Permalink
Fix lack of animation on join
Browse files Browse the repository at this point in the history
  • Loading branch information
appgurueu committed Jun 27, 2023
1 parent c48b282 commit b1ac86d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion init.lua
Expand Up @@ -152,7 +152,11 @@ minetest.register_on_joinplayer(function(player)
end
end

-- Disable animation & local animation
-- First update `character_anim` with the current animation
-- which mods like `player_api` might have already set
-- (note: these two methods are already hooked)
player:set_animation(player:get_animation())
-- Then disable animation & local animation
local no_anim = {x = 0, y = 0}
set_animation(player, no_anim, 0, 0, false)
set_local_animation(player, no_anim, no_anim, no_anim, no_anim, 1)
Expand Down

0 comments on commit b1ac86d

Please sign in to comment.