From a71e07f063eaa303e82ecd7888f7a51500469dbb Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Thu, 14 Mar 2013 00:04:24 -0300 Subject: [PATCH] Restore walk optimization --- src/client/game.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/client/game.cpp b/src/client/game.cpp index 058c1811..3b4dfcab 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -571,11 +571,10 @@ bool Game::walk(Otc::Direction direction) // check we can walk and add new walk event if false if(!m_localPlayer->canWalk(direction)) { - /* if(m_lastWalkDir != direction) { // must add a new walk event float ticks = m_localPlayer->getStepTicksLeft(); - if(ticks < 0) { ticks = 0; } + if(ticks <= 0) { ticks = 1; } if(m_walkEvent) { m_walkEvent->cancel(); @@ -583,7 +582,6 @@ bool Game::walk(Otc::Direction direction) } m_walkEvent = g_dispatcher.scheduleEvent([=] { walk(direction); }, ticks); } - */ return false; }