mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-20 14:23:16 -04:00
update player_textures table
This commit is contained in:
parent
95d53254ae
commit
395add69ac
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue