mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-07-16 11:16:44 -04:00
fixes
This commit is contained in:
parent
5d2834eb1f
commit
556cacf038
2 changed files with 4 additions and 4 deletions
|
@ -71,10 +71,10 @@ function player_api.set_textures(player, textures)
|
|||
player:set_properties({textures = textures or model_textures})
|
||||
end
|
||||
|
||||
function player_api.set_texture(player, texture, texture_ID)
|
||||
local ID = not texture_ID and 1 or texture_ID
|
||||
function player_api.set_texture(player, texture, index)
|
||||
local new_textures = player:get_properties().textures
|
||||
new_textures[ID] = texture
|
||||
index = index or 1
|
||||
new_textures[index] = texture
|
||||
player:set_properties({textures = new_textures})
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue