Added OnRevive virtual

Called when a monster is resurrected (allows resetting properties without needing an event handler).
This commit is contained in:
Boondorl 2025-06-16 10:26:36 -04:00 committed by Ricardo Luís Vaz Silva
commit e0baf7a85c
2 changed files with 7 additions and 0 deletions

View file

@ -8485,6 +8485,10 @@ void AActor::Revive()
Level->total_monsters++;
}
IFOVERRIDENVIRTUALPTRNAME(this, NAME_Actor, OnRevive)
{
VMCallVoid<AActor*>(func, this);
}
// [ZZ] resurrect hook
Level->localEventManager->WorldThingRevived(this);
}

View file

@ -595,6 +595,9 @@ class Actor : Thinker native
return true;
}
// Called after an Actor has been resurrected.
virtual void OnRevive() {}
// Called when an actor is to be reflected by a disc of repulsion.
// Returns true to continue normal blast processing.
virtual bool SpecialBlastHandling (Actor source, double strength)