Skip to content

Commit

Permalink
improve: pathfinder mt (opentibiabr#1769)
Browse files Browse the repository at this point in the history
It is not necessary to call g_dispatcher().asyncEvent, the goToFollowCreature_async method is already in charge of doing this
  • Loading branch information
mehah authored and marcusvcj committed Nov 20, 2023
1 parent 8e3f76a commit afe0553
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/creatures/creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,8 @@ void Creature::onThink(uint32_t interval) {
};

if (isUpdatingPath) {
g_dispatcher().asyncEvent([self = getCreature(), onThink = std::move(onThink)] {
self->isUpdatingPath = false;
self->goToFollowCreature_async(onThink);
});
isUpdatingPath = false;
goToFollowCreature_async(onThink);
return;
}

Expand Down

0 comments on commit afe0553

Please sign in to comment.