Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove Player:setNextWalkTask unused/unnecessary code #2492

Closed

Conversation

luanluciano93
Copy link
Contributor

@luanluciano93 luanluciano93 commented Mar 24, 2024

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

Credits: @danilopucci

@elsongabriel elsongabriel changed the title improve: remove PlayerAutoWalk dead code fix: remove PlayerAutoWalk unused/unnecessary code Apr 4, 2024
@elsongabriel elsongabriel changed the title fix: remove PlayerAutoWalk unused/unnecessary code fix: remove Player:setNextWalkTask unused/unnecessary code Apr 4, 2024
@majestyotbr
Copy link
Contributor

Is this ready for tests?

@luanluciano93
Copy link
Contributor Author

Is this ready for tests?

yes

Copy link
Contributor

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions bot added the Stale No activity label Aug 21, 2024
@phacUFPE phacUFPE self-requested a review August 22, 2024 15:23
@github-actions github-actions bot removed the Stale No activity label Aug 23, 2024
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions bot added the Stale No activity label Oct 27, 2024
@murilo09 murilo09 removed the Stale No activity label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants