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 and feliphechaves committed Jan 14, 2025
1 parent bb1ba42 commit ac9e13c
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 @@ -608,7 +608,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 ac9e13c

Please sign in to comment.