Clear animation data when appearance is updated

This commit is contained in:
m 2023-01-31 08:54:12 -05:00
parent 2c1d9e1330
commit 4e5ae2a6ab

View file

@ -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,