From 9adf04031bd86eb72376636f261b2feed2abb491 Mon Sep 17 00:00:00 2001 From: Renato Machado Date: Mon, 9 Dec 2024 14:48:54 -0300 Subject: [PATCH] perf: multithreading in updateTargetList in all events (#3074) Previously, the multithreading of updateTargetList only worked for walk events, now all requests to these methods will be executed async. --- src/creatures/monsters/monster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/creatures/monsters/monster.cpp b/src/creatures/monsters/monster.cpp index 7276bea19d1..49472ec209f 100644 --- a/src/creatures/monsters/monster.cpp +++ b/src/creatures/monsters/monster.cpp @@ -602,7 +602,7 @@ bool Monster::removeTarget(const std::shared_ptr &creature) { } void Monster::updateTargetList() { - if (g_dispatcher().context().getGroup() == TaskGroup::Walk) { + if (!g_dispatcher().context().isAsync()) { setAsyncTaskFlag(UpdateTargetList, true); return; }