mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-21 06:43:17 -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
|
end
|
||||||
|
|
||||||
function player_api.set_texture(player, texture, index)
|
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
|
index = index or 1
|
||||||
new_textures[index] = texture
|
new_textures[index] = texture
|
||||||
player:set_properties({textures = new_textures})
|
player_api.set_textures(player, new_textures)
|
||||||
end
|
end
|
||||||
|
|
||||||
function player_api.set_animation(player, anim_name, speed)
|
function player_api.set_animation(player, anim_name, speed)
|
||||||
|
|
Loading…
Add table
Reference in a new issue