mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-21 21:20:04 +00:00
Fix one-off mobs respawning if their regenTime is 0
This commit is contained in:
parent
3365cb53b7
commit
05a5303522
@ -478,6 +478,14 @@ void MobAI::deadStep(CombatNPC* npc, time_t currTime) {
|
||||
if (self->groupLeader == self->id)
|
||||
roamingStep(self, currTime);
|
||||
|
||||
/*
|
||||
* If the mob hasn't fully despanwed yet, don't try to respawn it. This protects
|
||||
* against the edge case where mobs with a very short regenTime would try to respawn
|
||||
* before they've faded away; and would respawn even if they were meant to be removed.
|
||||
*/
|
||||
if (!self->despawned)
|
||||
return;
|
||||
|
||||
if (self->killedTime != 0 && currTime - self->killedTime < self->regenTime * 100)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user