mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-11 21:10:50 +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
4fac2e3ebc
commit
3d22c635f4
1 changed files with 11 additions and 1 deletions
|
@ -3524,8 +3524,18 @@ bool P_BounceWall(AActor *mo)
|
||||||
extern FRandom pr_bounce;
|
extern FRandom pr_bounce;
|
||||||
bool P_BounceActor(AActor *mo, AActor *BlockingMobj, bool ontop)
|
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.
|
//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)
|
if (mo && BlockingMobj && ((mo->BounceFlags & BOUNCE_AllActors)
|
||||||
|| ((mo->flags & MF_MISSILE) && (!(mo->flags2 & MF2_RIP)
|
|| ((mo->flags & MF_MISSILE) && (!(mo->flags2 & MF2_RIP)
|
||||||
|| (BlockingMobj->flags5 & MF5_DONTRIP)
|
|| (BlockingMobj->flags5 & MF5_DONTRIP)
|
||||||
|
|
Loading…
Reference in a new issue