Fix auto walking bug

master
BeniS 11 years ago
parent 4c3c945bab
commit e7012031eb

@ -61,7 +61,7 @@ function online()
cooldownWindow:close()
end
if lastPlayer ~= g_game.getCharacterName() then
if not lastPlayer or lastPlayer ~= g_game.getCharacterName() then
refresh()
lastPlayer = g_game.getCharacterName()
end

@ -627,7 +627,7 @@ void Game::autoWalk(std::vector<Otc::Direction> dirs)
Otc::Direction direction = *it;
if(m_localPlayer->canWalk(direction)) {
TilePtr toTile = g_map.getTile(m_localPlayer->getPosition().translatedToDirection(direction));
if(toTile && toTile->isWalkable() && !m_localPlayer->isAutoWalking()) {
if(toTile && toTile->isWalkable() && !m_localPlayer->isServerWalking()) {
m_localPlayer->preWalk(direction);
if(getFeature(Otc::GameForceFirstAutoWalkStep)) {

Loading…
Cancel
Save