update player_textures table

This commit is contained in:
Zughy 2022-01-15 22:02:41 +01:00
parent 95d53254ae
commit 395add69ac

View file

@ -72,10 +72,10 @@ function player_api.set_textures(player, textures)
end
function player_api.set_texture(player, texture, index)
local new_textures = player:get_properties().textures
local new_textures = table.copy(player_api.get_textures(player))
index = index or 1
new_textures[index] = texture
player:set_properties({textures = new_textures})
player_api.set_textures(player, new_textures)
end
function player_api.set_animation(player, anim_name, speed)