Extra extra8

From EDukeWiki
Revision as of 14:06, 5 February 2022 by Doom64hunter (talk | contribs)
Jump to navigation Jump to search

This variable tracks additional, fractional damage which is to be applied to the player. This value is initialized to zero.

The damage will only be applied as soon as the stored value is greater or equal to 256. If this is the case, the value will be reset to 0.

The only hardcoded use for extra_extra8 is to track the amount of drowning damage the player has taken.

The value is used in the function P_IncurDamage, which corresponds to the event EVENT_INCURDAMAGE. If extra_extra8 is negative, it will heal the player, but extra_extra8 will not be reset to 0.

The actual damage applied to the player is modified by shield_amount. This behavior can be intercepted in the EVENT_INCURDAMAGE event