Skip to content

Commit

Permalink
improve: pathfinder mt (#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 Nov 3, 2023
1 parent 436bcac commit c077921
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 c077921

Please sign in to comment.