From 56aa416fee1c2a6ef4aa9b7461b20b42f65df19b Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Fri, 6 Jan 2012 23:48:16 -0200 Subject: [PATCH] classic control option --- TODO | 1 + modules/client_options/options.lua | 3 ++- modules/client_options/options.otui | 6 +++++- src/otclient/core/game.cpp | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/TODO b/TODO index ae62f24f..fdd11e66 100644 --- a/TODO +++ b/TODO @@ -67,6 +67,7 @@ [bart] chat with tabs [bart] limit FPS in options [baxnie] do lua game event calls from Game instead from GameProtocol +[baxnie] classic control [baxnie] trade window [baxnie] auto walk [baxnie] hotkeys window diff --git a/modules/client_options/options.lua b/modules/client_options/options.lua index f3331ae0..02201109 100644 --- a/modules/client_options/options.lua +++ b/modules/client_options/options.lua @@ -3,7 +3,8 @@ Options = {} function Options.load() local booleanOptions = { vsync = true, showfps = true, - fullscreen = false } + fullscreen = false, + classicControl = false } for k,v in pairs(booleanOptions) do Settings.setDefault(k, v) diff --git a/modules/client_options/options.otui b/modules/client_options/options.otui index c41e8a11..e5f688aa 100644 --- a/modules/client_options/options.otui +++ b/modules/client_options/options.otui @@ -19,7 +19,7 @@ OptionCheckBox < CheckBox MainWindow id: optionsWindow title: Options - size: 286 120 + size: 286 140 OptionCheckBox id: vsync @@ -34,6 +34,10 @@ MainWindow id: fullscreen text: Fullscreen + OptionCheckBox + id: classicControl + text: Classic control + Button text: Ok width: 64 diff --git a/src/otclient/core/game.cpp b/src/otclient/core/game.cpp index 11aade78..9500bc6b 100644 --- a/src/otclient/core/game.cpp +++ b/src/otclient/core/game.cpp @@ -106,7 +106,7 @@ void Game::processInventoryChange(int slot, const ItemPtr& item) void Game::walk(Otc::Direction direction) { - if(!m_online || !m_localPlayer->canWalk(direction) || (!checkBotProtection() && m_localPlayer->getNextWalkDirection() == Otc::InvalidDirection)) + if(!m_online || !m_localPlayer->canWalk(direction) || !checkBotProtection()) return; cancelFollow(); @@ -318,7 +318,7 @@ bool Game::checkBotProtection() { #ifndef DISABLE_BOT_PROTECTION if(g_lua.isInCppCallback() && !g_ui.isOnInputEvent()) { - logError("cought a lua call to a bot protected game function, the call was canceled"); + logError("caught a lua call to a bot protected game function, the call was canceled"); return false; } #endif