Skip to content

Commit bb4029a

Browse files
Fix invisible group mobs bug
This is a simplified adaptation of 29e7bd2 from Retrobution. Co-authored-by: Jade <[email protected]>
1 parent 25ce0f6 commit bb4029a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/MobAI.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,17 @@ void MobAI::groupRetreat(Mob *mob) {
9898
}
9999
Mob* followerMob = (Mob*)NPCManager::NPCs[leadMob->groupMember[i]];
100100

101+
if (followerMob->state != MobState::COMBAT)
102+
continue;
103+
101104
followerMob->target = nullptr;
102105
followerMob->state = MobState::RETREAT;
103106
clearDebuff(followerMob);
104107
}
105108

109+
if (leadMob->state != MobState::COMBAT)
110+
return;
111+
106112
leadMob->target = nullptr;
107113
leadMob->state = MobState::RETREAT;
108114
clearDebuff(leadMob);

0 commit comments

Comments
 (0)