mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 04:24:54 +02:00
Fix a bug with autowalking & add prompt param for tryLogout.
(We don't want to be prompted when pressing Ctrl + Q or Ctrl + L).
This commit is contained in:
@@ -72,7 +72,7 @@ bool LocalPlayer::canWalk(Otc::Direction direction)
|
||||
return false;
|
||||
|
||||
// last walk is not done yet
|
||||
if(m_walkTimer.ticksElapsed() < getStepDuration())
|
||||
if((m_walkTimer.ticksElapsed() < getStepDuration()) && !isAutoWalking())
|
||||
return false;
|
||||
|
||||
// prewalk has a timeout, because for some reason that I don't know yet the server sometimes doesn't answer the prewalk
|
||||
@@ -83,7 +83,7 @@ bool LocalPlayer::canWalk(Otc::Direction direction)
|
||||
return false;
|
||||
|
||||
// cannot walk while already walking
|
||||
if(m_walking && (!prewalkTimeouted || m_secondPreWalk))
|
||||
if((m_walking && !isAutoWalking()) && (!prewalkTimeouted || m_secondPreWalk))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user