mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-21 06:43:17 -04:00
Fix error if no previous animation
This commit is contained in:
parent
01b7c9604f
commit
c5e04b0e84
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ function player_api.set_animation(player, anim_name, speed)
|
|||
if player_data.animation == anim_name and player_data.animation_speed == speed then
|
||||
return
|
||||
end
|
||||
local previous_anim_equals = model.animations[player_data.animation]._equals
|
||||
local previous_anim_equals = (model.animations[player_data.animation] or {})._equals
|
||||
local anim = model.animations[anim_name]
|
||||
player_data.animation = anim_name
|
||||
player_data.animation_speed = speed
|
||||
|
|
Loading…
Add table
Reference in a new issue