P_BounceActor now calls SpecialMissileHit before any other bouncing effects are processed. Return values are as such: (#1156)

- 1: The missile will continue moving through the actor, and it's down to the modder to handle bouncing.
- 0: The missile will explode.
- Any other value will process a bouncing actor as normally done in the engine.
This commit is contained in:
MajorCooke 2020-08-14 01:01:32 -05:00 committed by GitHub
parent 24200c0c3f
commit 7e4a996cd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3513,8 +3513,18 @@ bool P_BounceWall(AActor *mo)
extern FRandom pr_bounce;
bool P_BounceActor(AActor *mo, AActor *BlockingMobj, bool ontop)
{
if (mo && (mo->flags & MF_MISSILE) && BlockingMobj)
{
switch (mo->SpecialMissileHit(BlockingMobj))
{
case 1: return true;
case 0: return false;
default: break;
}
}
//Don't go through all of this if the actor is reflective and wants things to pass through them.
if (BlockingMobj && ((BlockingMobj->flags2 & MF2_REFLECTIVE) && (BlockingMobj->flags7 & MF7_THRUREFLECT))) return true;
if (BlockingMobj && ((BlockingMobj->flags2 & MF2_REFLECTIVE) && (BlockingMobj->flags7 & MF7_THRUREFLECT))) return true;
if (mo && BlockingMobj && ((mo->BounceFlags & BOUNCE_AllActors)
|| ((mo->flags & MF_MISSILE) && (!(mo->flags2 & MF2_RIP)
|| (BlockingMobj->flags5 & MF5_DONTRIP)