Added bounce virtual

This commit is contained in:
Boondorl 2023-01-19 19:58:04 -05:00 committed by Rachael Alexanderson
commit 5a74e79b92
4 changed files with 54 additions and 0 deletions

View file

@ -3518,6 +3518,16 @@ bool FSlide::BounceWall(AActor *mo)
}
line = bestslideline;
if (mo->flags & MF_MISSILE)
{
switch (mo->SpecialBounceHit(nullptr, line, nullptr))
{
case 1: return true;
case 0: return false;
default: break;
}
}
if (line->special == Line_Horizon || ((mo->BounceFlags & BOUNCE_NotOnSky) && line->hitSkyWall(mo)))
{
mo->SeeSound = mo->BounceSound = NO_SOUND; // it might make a sound otherwise
@ -3608,6 +3618,13 @@ bool P_BounceActor(AActor *mo, AActor *BlockingMobj, bool ontop)
case 0: return false;
default: break;
}
switch (mo->SpecialBounceHit(BlockingMobj, nullptr, nullptr))
{
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.