SpecialBounceHit

From ZDoom Wiki
Jump to navigation Jump to search

Actor

virtual int SpecialBounceHit(Actor bounceMobj, Line bounceLine, SecPlane bouncePlane)

Usage

Called by bouncing projectiles when they hit an actor, a line or a plane. This function will only be called if one of the bouncing flags is set (either directly or through the BounceType property):

Parameters

  • Actor bounceMobj
The actor the projectile collided with. Requires the BOUNCEONACTORS flag.
The line the projectiled collided with. Requires the BOUNCEONWALLS flag.
The plane the projectiled collided with. Requires BOUNCEONFLOORS for floors and BOUNCEONCEILINGS for ceilings.

Return values

Note: the MHIT* constants were added in GZDoom 4.12. Prior to that, numbers had to be used directly.

  • -1
MHIT_DEFAULT (New from 4.12)
(Default) The projectile utilizes its default bouncing behavior in accordance with its BounceFactor/WallBounceFactor
  • 0
MHIT_DESTROY (New from 4.12)
For actors and lines: the projectile explodes (enters its Death sequence).
For planes: the projectile slides along the plane instead of bouncing (effectively, behaves as if its BounceFactor was set to 0.0).
  • 1
MHIT_PASS (New from 4.12)
For actors: the projectile explodes (enters its Death sequence).
For planes and lines: the projectile slides along the plane/line instead of bouncing (as if its BounceFactor was set to 0.0).

Examples

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.