mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-20 06:13:17 -04:00
Clear animation data when appearance is updated
This commit is contained in:
parent
2c1d9e1330
commit
4e5ae2a6ab
1 changed files with 4 additions and 0 deletions
|
@ -71,6 +71,10 @@ function player_api.set_model(player, model_name)
|
||||||
|
|
||||||
local model = models[model_name]
|
local model = models[model_name]
|
||||||
if model then
|
if model then
|
||||||
|
if (model.animations) then
|
||||||
|
player_data.animation = nil
|
||||||
|
player_data.animation_speed = nil
|
||||||
|
}
|
||||||
player:set_properties({
|
player:set_properties({
|
||||||
mesh = model_name,
|
mesh = model_name,
|
||||||
textures = player_data.textures or model.textures,
|
textures = player_data.textures or model.textures,
|
||||||
|
|
Loading…
Add table
Reference in a new issue