Jazz2::Actors::IActorUpdateOverride class

Takes over the per-frame update of an object.

Set by ActorBase::SetUpdateOverride(), lets a level script decide when the object does what it would do by itself.

Derived classes

class Jazz2::Scripting::Legacy::ScriptObjectHost
Drives an object of the game by a behavior of a level script, as JJ2+ does with the objects whose template (jjObjectPresets) has a behavior of the script.

Constructors, destructors, conversion operators

~IActorUpdateOverride() virtual

Public functions

void OnUpdate(ActorBase* actor, float timeMult) pure virtual
Called instead of the per-frame update of the object.
auto IsDrawn() const -> bool pure virtual
Returns false if the object isn't drawn in this frame.
auto OnCollision(ActorBase* actor, ActorBase* other) -> bool virtual
Called before the object and another one handle their collision.
auto OnUpdateHitbox(ActorBase* actor) -> bool virtual
Called before the hitbox is made of the bounding box, see ActorBase::UpdateHitbox().
void OnEmitLights(ActorBase* actor, SmallVectorImpl<LightEmitter>& lights) virtual
Called after the object emitted its own lights, see ActorBase::EmitLights().
auto OnPerish(ActorBase* actor, ActorBase* collider) -> bool virtual
Called when the object runs out of health, returns true if it lives on.
auto OwnsDebris() const -> bool virtual
Returns true if the override makes the debris instead of the object.
auto OwnsLights() const -> bool virtual
Returns true if the override emits all lights instead of the object, see OnEmitLights().
auto OnTileDeactivated(ActorBase* actor) -> bool virtual
Called when the object is out of reach of the players, returns false if the override handles it.

Function documentation

bool Jazz2::Actors::IActorUpdateOverride::OnCollision(ActorBase* actor, ActorBase* other) virtual

Called before the object and another one handle their collision.

Returns true if handled, neither of them is told about it then.

bool Jazz2::Actors::IActorUpdateOverride::OnUpdateHitbox(ActorBase* actor) virtual

Called before the hitbox is made of the bounding box, see ActorBase::UpdateHitbox().

Returns true if ActorBase::AABBInner is set already.