otland / forgottenserver

A free and open-source MMORPG server emulator written in C++
https://otland.net
GNU General Public License v2.0
1.57k stars 1.05k forks source link

Remove PlayerAutoWalk dead code #4635

Closed danilopucci closed 5 months ago

danilopucci commented 5 months ago

Pull Request Prelude

Removes dead code from Player Walk logic

Changes Proposed

The changes on this PR is a simple removal of dead code.

nextStepEvent is the eventId which is supposed to be created at Player::setNextWalkTask. The only call to this method is from Game::playerAutoWalk with a nullptr. So everytime the Player::setNextWalkTask is called is with a nullptr, which results on no code execution, as the nextStepEvent is 0 and task is null.

The nextStepEvent someday was replaced by eventWalk, which is handled by Creature::addEventWalk and Creature::stopEventWalk

Issues addressed: