Version 1.6 - important fix for high memory usage

This commit is contained in:
OTCv8
2020-01-01 23:22:56 +01:00
parent d15cc347dc
commit 1d2bdf855d
21 changed files with 83 additions and 322 deletions

View File

@@ -67,7 +67,12 @@ end
function bindKeys()
gameRootPanel:setAutoRepeatDelay(10)
g_keyboard.bindKeyPress('Escape', function() g_game.cancelAttackAndFollow() end, gameRootPanel)
local lastAction = 0
g_keyboard.bindKeyPress('Escape', function()
if lastAction + 50 > g_clock.millis() then return end
lastAction = g_clock.millis()
g_game.cancelAttackAndFollow()
end, gameRootPanel)
g_keyboard.bindKeyPress('Ctrl+=', function() if g_game.getFeature(GameNoDebug) then return end gameMapPanel:zoomIn() end, gameRootPanel)
g_keyboard.bindKeyPress('Ctrl+-', function() if g_game.getFeature(GameNoDebug) then return end gameMapPanel:zoomOut() end, gameRootPanel)
g_keyboard.bindKeyDown('Ctrl+Q', function() tryLogout(false) end, gameRootPanel)