Skip to content

Commit

Permalink
Fix diagonals incorrect prewalk
Browse files Browse the repository at this point in the history
  • Loading branch information
nekiro committed Jan 13, 2025
1 parent 1cd430d commit dd131c6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/client/localplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ bool LocalPlayer::canWalk(const Otc::Direction dir, const bool ignoreLock)
if (isWalking()) {
if (isAutoWalking()) return true; // always allow automated walks
if (isPreWalking()) return false; // allow only single prewalk
return m_walkTimer.ticksElapsed() >= getStepDuration(); // allow only if walk done
}

return true;
return m_walkTimer.ticksElapsed() >= getStepDuration(); // allow only if walk done, ex. diagonals may need additional ticks before taking another step
}

void LocalPlayer::walk(const Position& oldPos, const Position& newPos)
Expand Down

0 comments on commit dd131c6

Please sign in to comment.