From 988c5f27a1ec656857a57589df20f4973f96e3f7 Mon Sep 17 00:00:00 2001 From: grilledham Date: Sun, 24 Jun 2018 11:52:51 +0100 Subject: [PATCH] small performance tweak --- utils/gui.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/gui.lua b/utils/gui.lua index ea465e18..cca99190 100644 --- a/utils/gui.lua +++ b/utils/gui.lua @@ -17,12 +17,12 @@ end -- Associates data with the LuaGuiElement. If data is nil then removes the data function Gui.set_data(element, data) - global.Gui_data[element.player_index .. ',' .. element.index] = data + global.Gui_data[element.player_index * 0x100000000 + element.index] = data end -- Gets the Associated data with this LuaGuiElement if any. function Gui.get_data(element) - return global.Gui_data[element.player_index .. ',' .. element.index] + return global.Gui_data[element.player_index * 0x100000000 + element.index] end -- Removes data associated with LuaGuiElement and its children recursivly.