From 0bb991e14e33f05867bb5420c3acc0e6164b60ee Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Sat, 18 Aug 2012 00:30:40 -0300 Subject: [PATCH] Fix auto chase override --- .../skins/default/fonts/verdana-11px-monochrome.otfont | 2 +- modules/game_combatcontrols/combatcontrols.lua | 6 ++++-- src/otclient/game.cpp | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/client_skins/skins/default/fonts/verdana-11px-monochrome.otfont b/modules/client_skins/skins/default/fonts/verdana-11px-monochrome.otfont index 1c22e827..15575969 100644 --- a/modules/client_skins/skins/default/fonts/verdana-11px-monochrome.otfont +++ b/modules/client_skins/skins/default/fonts/verdana-11px-monochrome.otfont @@ -3,4 +3,4 @@ Font texture: verdana-11px-monochrome_cp1252.png height: 14 glyph-size: 16 16 - space-width: 4 + space-width: 3 diff --git a/modules/game_combatcontrols/combatcontrols.lua b/modules/game_combatcontrols/combatcontrols.lua index e1119f69..9acd6c37 100644 --- a/modules/game_combatcontrols/combatcontrols.lua +++ b/modules/game_combatcontrols/combatcontrols.lua @@ -33,7 +33,8 @@ function init() onFightModeChange = update, onChaseModeChange = update, onSafeFightChange = update, - onWalk = check + onWalk = check, + onAutoWalk = check }) if g_game.isOnline() then @@ -56,7 +57,8 @@ function terminate() onFightModeChange = update, onChaseModeChange = update, onSafeFightChange = update, - onWalk = check + onWalk = check, + onAutoWalk = check }) end diff --git a/src/otclient/game.cpp b/src/otclient/game.cpp index 0772c0c7..f107add7 100644 --- a/src/otclient/game.cpp +++ b/src/otclient/game.cpp @@ -499,9 +499,9 @@ void Game::walk(Otc::Direction direction) return; } - forceWalk(direction); - g_lua.callGlobalField("g_game", "onWalk", direction); + + forceWalk(direction); } void Game::autoWalk(const std::vector& dirs) @@ -529,9 +529,9 @@ void Game::autoWalk(const std::vector& dirs) m_localPlayer->preWalk(direction); } - m_protocolGame->sendAutoWalk(dirs); - g_lua.callGlobalField("g_game", "onAutoWalk", dirs); + + m_protocolGame->sendAutoWalk(dirs); } void Game::forceWalk(Otc::Direction direction)