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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
41f715f
Update game.cpp
luanluciano93 Mar 24, 2024
d51c6d1
Code format - (Clang-format)
github-actions[bot] Mar 24, 2024
b870c60
Update player.cpp
luanluciano93 Mar 24, 2024
3cb5f18
Update player.hpp
luanluciano93 Mar 24, 2024
de70ef6
Merge branch 'main' into player-walk-dead-code
luanluciano93 Mar 28, 2024
d05b59c
Merge branch 'main' into player-walk-dead-code
elsongabriel Apr 26, 2024
afbaa54
Code format - (Clang-format)
github-actions[bot] Apr 26, 2024
1dbc266
Merge branch 'main' into player-walk-dead-code
luanluciano93 Apr 29, 2024
2e746d2
Merge branch 'main' into player-walk-dead-code
luanluciano93 May 9, 2024
bbf4fe0
Merge branch 'main' into player-walk-dead-code
luanluciano93 May 14, 2024
f711e80
Merge branch 'main' into player-walk-dead-code
luanluciano93 May 16, 2024
b9f2bfa
Merge branch 'main' into player-walk-dead-code
luanluciano93 Jun 7, 2024
c3bc466
Merge branch 'main' into player-walk-dead-code
luanluciano93 Jun 12, 2024
762a6a1
Merge branch 'main' into player-walk-dead-code
luanluciano93 Jun 13, 2024
7784463
Merge branch 'main' into player-walk-dead-code
luanluciano93 Jun 17, 2024
72e750a
Merge branch 'main' into player-walk-dead-code
luanluciano93 Jun 23, 2024
b5034a3
Merge branch 'main' into player-walk-dead-code
luanluciano93 Jul 3, 2024
015d586
Merge branch 'main' into player-walk-dead-code
luanluciano93 Jul 8, 2024
b61da27
Merge branch 'main' into player-walk-dead-code
luanluciano93 Jul 21, 2024
a7257f4
Merge branch 'main' into player-walk-dead-code
luanluciano93 Sep 12, 2024
7e83e97
Merge branch 'main' into player-walk-dead-code
luanluciano93 Sep 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions src/creatures/players/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2125,18 +2125,6 @@ void Player::setNextWalkActionTask(std::shared_ptr<Task> task) {
walkTask = task;
}

void Player::setNextWalkTask(std::shared_ptr<Task> task) {
if (nextStepEvent != 0) {
g_dispatcher().stopEvent(nextStepEvent);
nextStepEvent = 0;
}

if (task) {
nextStepEvent = g_dispatcher().scheduleEvent(task);
resetIdleTime();
}
}

void Player::setNextActionTask(std::shared_ptr<Task> task, bool resetIdleTime /*= true */) {
if (actionTaskEvent != 0) {
g_dispatcher().stopEvent(actionTaskEvent);
Expand Down
2 changes: 0 additions & 2 deletions src/creatures/players/player.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2683,7 +2683,6 @@ class Player final : public Creature, public Cylinder, public Bankable {
void updateInventoryImbuement();

void setNextWalkActionTask(std::shared_ptr<Task> task);
void setNextWalkTask(std::shared_ptr<Task> task);
void setNextActionTask(std::shared_ptr<Task> task, bool resetIdleTime = true);
void setNextActionPushTask(std::shared_ptr<Task> task);
void setNextPotionActionTask(std::shared_ptr<Task> task);
Expand Down Expand Up @@ -2843,7 +2842,6 @@ class Player final : public Creature, public Cylinder, public Bankable {
uint32_t actionTaskEvent = 0;
uint32_t actionTaskEventPush = 0;
uint32_t actionPotionTaskEvent = 0;
uint32_t nextStepEvent = 0;
uint32_t walkTaskEvent = 0;
uint32_t MessageBufferTicks = 0;
uint32_t lastIP = 0;
Expand Down
2 changes: 0 additions & 2 deletions src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3578,7 +3578,6 @@ void Game::playerAutoWalk(uint32_t playerId, const std::vector<Direction> &listD
}

player->resetIdleTime();
player->setNextWalkTask(nullptr);
player->startAutoWalk(listDir, false);
}

Expand All @@ -3594,7 +3593,6 @@ void Game::forcePlayerAutoWalk(uint32_t playerId, const std::vector<Direction> &
player->setFollowCreature(nullptr);

player->resetIdleTime();
player->setNextWalkTask(nullptr);

player->startAutoWalk(listDir, true);
}
Expand Down
Loading