mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
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:
parent
24200c0c3f
commit
7e4a996cd4
1 changed files with 11 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue