Skip to content
Browse files

Player API: Apply model default textures when passing nil to 'set_tex…

  • Loading branch information...
danielmeek32 authored and paramat committed Jul 30, 2017
1 parent 5d19fd6 commit 271b2befaacc80f4bcc63e5cdfb31cb64ff2fec9
Showing with 4 additions and 2 deletions.
  1. +4 −2 mods/player_api/api.lua
@@ -58,8 +58,10 @@ end

function player_api.set_textures(player, textures)
local name = player:get_player_name()
player_textures[name] = textures
player:set_properties({textures = textures,})
local model = models[player_model[name]]
local model_textures = model and model.textures or nil
player_textures[name] = textures or model_textures
player:set_properties({textures = textures or model_textures,})

function player_api.set_animation(player, anim_name, speed)

0 comments on commit 271b2be

Please sign in to comment.
You can’t perform that action at this time.