Skip to content

Commit

Permalink
Update monster.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
mehah committed Nov 7, 2024
1 parent 4ae6bdf commit 13cd49b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions 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 Expand Up @@ -967,7 +967,6 @@ void Monster::setIdle(bool idle) {

if (!isIdle) {
g_game().addCreatureCheck(getMonster());

} else {
onIdleStatus();
clearTargetList();
Expand All @@ -977,7 +976,7 @@ void Monster::setIdle(bool idle) {
}

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

0 comments on commit 13cd49b

Please sign in to comment.