Skip to content

Revise GAMEEVENT_ACTOR_ARMORDAMAGED.

Rename GAMEEVENT_ACTOR_ARMORDAMAGED to GAMEEVENT_ACTOR_DAMAGED_PREMOD to more descriptively match its behaviour (as armor hasn't actually been damaged yet, and it executed for actors with inventory items, not armor), and move the event up a little, so it can be used to check/modify damage early across all actors, including those without inventory items.

My Rationale:

GAMEEVENT_ACTOR_DAMAGED won't always fire in certain scenarios, like if armor absorbs all damage, so it's useless if you're trying to get something that'll execute all of the time on all actors, once per instance of damage. This change gives you such an ability. It also helps for when you want to do something based on pre-modified damage. (Like setting velocity)

GAMEEVENT_ACTOR_ARMORDAMAGED before this change has problems too, because it didn't guarantee that the target had armor, just inventory, and only if they had inventory. Since both events can fire in the same instance of damage, trying to cover all scenarios and checking if one was handled by the other becomes a confusing clusterfuck of a nightmare very quickly.

Edited by StrikerTheHedgefox

Merge request reports