From c07792138640a445802bc5b53462f12e773673f0 Mon Sep 17 00:00:00 2001
From: Renato Machado <mehahx@gmail.com>
Date: Fri, 3 Nov 2023 10:35:32 -0300
Subject: [PATCH] improve: pathfinder mt (#1769)

It is not necessary to call g_dispatcher().asyncEvent, the goToFollowCreature_async method is already in charge of doing this
---
 src/creatures/creature.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/creatures/creature.cpp b/src/creatures/creature.cpp
index 7058753acf1..a001e9087a5 100644
--- a/src/creatures/creature.cpp
+++ b/src/creatures/creature.cpp
@@ -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;
 	}