Skip to content
Snippets Groups Projects
Commit 46e51936 authored by Peter Nerlich's avatar Peter Nerlich
Browse files

Merge remote-tracking branch 'upstream/master'

parents 8cfd0f8f e026a1f3
No related branches found
No related tags found
No related merge requests found
......@@ -142,6 +142,10 @@ end
local function save_skin(player)
local player_meta = player:get_meta()
if player_meta == nil then
-- The player disconnected before this function was dispatched
return
end
local function save_data(data_name)
local indexes = skin_indexes[player]
......@@ -162,6 +166,11 @@ end
local function get_texture(player)
local player_meta = player:get_meta()
if player_meta == nil then
-- The player disconnected before this function was dispatched
return ""
end
local indexes = skin_indexes[player]
local texture = ""
local gender = player_meta:get_string("character_creator:gender")
......@@ -199,6 +208,11 @@ end
local function change_skin(player)
local player_meta = player:get_meta()
if player_meta == nil then
-- The player disconnected before this function was dispatched
return
end
local texture = get_texture(player)
local width = player_meta:get_float("character_creator:width")
......@@ -243,6 +257,11 @@ if skinsdb then
--change skin redefinition for skinsdb
function change_skin(player)
local player_meta = player:get_meta()
if player_meta == nil then
-- The player disconnected before this function was dispatched
return
end
local playername = player:get_player_name()
local skinname = "character_creator:"..playername
local skin_obj = skinsdb.get(skinname) or skinsdb.new(skinname)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment