mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 23:10:17 +01:00
Fix player_api.set_model
not updating the animation
This commit is contained in:
parent
2c1d9e1330
commit
8d60e85dfc
@ -67,7 +67,11 @@ function player_api.set_model(player, model_name)
|
|||||||
if player_data.model == model_name then
|
if player_data.model == model_name then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
-- Update data
|
||||||
player_data.model = model_name
|
player_data.model = model_name
|
||||||
|
-- Clear animation data as the model has changed
|
||||||
|
-- (required for setting the `stand` animation not to be a no-op)
|
||||||
|
player_data.animation, player_data.animation_speed = nil, nil
|
||||||
|
|
||||||
local model = models[model_name]
|
local model = models[model_name]
|
||||||
if model then
|
if model then
|
||||||
|
Loading…
Reference in New Issue
Block a user