mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 19:44:54 +02:00
Avoid spr loading freeze when logging
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
function init()
|
||||
if g_game.getClientVersion() ~= 0 then
|
||||
load()
|
||||
end
|
||||
connect(g_game, { onClientVersionChange = load })
|
||||
end
|
||||
|
||||
function terminate()
|
||||
disconnect(g_game, { onClientVersionChange = load })
|
||||
end
|
||||
|
||||
function load()
|
||||
|
@@ -5,3 +5,4 @@ Module
|
||||
sandboxed: true
|
||||
scripts: [tibiafiles.lua]
|
||||
@onLoad: init()
|
||||
@onUnload: terminate()
|
||||
|
Reference in New Issue
Block a user