Skip to content

Commit

Permalink
perf: multithreading in updateTargetList in all events (opentibiabr#3074
Browse files Browse the repository at this point in the history
)

Previously, the multithreading of updateTargetList only worked for walk
events, now all requests to these methods will be executed async.
  • Loading branch information
mehah authored Dec 9, 2024
1 parent b54a712 commit 9adf040
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/creatures/monsters/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ bool Monster::removeTarget(const std::shared_ptr<Creature> &creature) {
}

void Monster::updateTargetList() {
if (g_dispatcher().context().getGroup() == TaskGroup::Walk) {
if (!g_dispatcher().context().isAsync()) {
setAsyncTaskFlag(UpdateTargetList, true);
return;
}
Expand Down

0 comments on commit 9adf040

Please sign in to comment.