SpecialBounceHit
Jump to navigation
Jump to search
virtual int SpecialBounceHit(Actor bounceMobj, Line bounceLine, SecPlane bouncePlane)
Contents
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):
- BOUNCEONACTORS: trigger the function by colliding with an actor
- BOUNCEONWALLS: trigger the function by colliding with lines
- BOUNCEONFLOORS: trigger the function by colliding with floor planes
- BOUNCEONCEILINGS: trigger the function by colliding with ceiling planes
Parameters
- Actor bounceMobj
- The actor the projectile collided with. Requires the BOUNCEONACTORS flag.
- Line bounceLine
- The line the projectiled collided with. Requires the BOUNCEONWALLS flag.
- SecPlane bouncePlane
- 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
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. |