From ZDoom Wiki
Jump to navigation Jump to search

int GetRadiusDamage (Actor thing, int damage, int distance [, int fulldmgdistance [, bool oldradiusdmg[, bool round]]])


Performs the formula used by A_Explode to determine how much damage an actor should take, originating from the calling actor, on thing for the purpose of calculating the raw radius damage it would receive. Since no actual damage is inflicted, damage modifiers, such as damage factors and protection powerups, are excluded from damage calculation. Splash and radius damage factors are also excluded, so they need to be manually factored in, such as with ApplyDamageFactor().


  • thing: A pointer to the actor on which to perform the attack.
  • damage: How much damage would be inflicted at the center of the explosion.
  • distance: The coverage area of the attack. This is the same as damage if it is set to 0 or less.
  • fulldmgdistance: The area within which full damage would be inflicted. Default is 0.
  • oldradiusdmg: The method of calculating the damage. If true, the function uses the old method which is utilized by actors such us explosive barrels, otherwise if false, the standard method is used, which takes z-height into account. Default is false.
  • round: Return the damage thing would receive using a spherical blast, as opposed to the original cuboid shape Doom uses. Used by explosions with XF_CIRCULAR.

Return value

The amount of raw radius damage that thing would receive. The damage amount which is passed to the function is returned as is if the calling actor performs the attack on itself, since it is at the center of the explosion. If thing is out of the coverage area, the function returns negative damage values. In all other cases, the function returns 0.


Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.