- On second thought, using FloorBounceMissile() for bouncing off the top of an actor might not

be the best idea.

SVN r3598 (trunk)
This commit is contained in:
Randy Heit 2012-04-26 03:50:11 +00:00
commit f8e64a13af
3 changed files with 58 additions and 19 deletions

View file

@ -1763,7 +1763,7 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly)
line_t *BlockingLine = mo->BlockingLine;
if (!(mo->flags & MF_MISSILE) && (mo->BounceFlags & BOUNCE_MBF)
&& (BlockingMobj != NULL ? P_BounceActor(mo, BlockingMobj) : P_BounceWall(mo)))
&& (BlockingMobj != NULL ? P_BounceActor(mo, BlockingMobj, false) : P_BounceWall(mo)))
{
// Do nothing, relevant actions already done in the condition.
// This allows to avoid setting velocities to 0 in the final else of this series.
@ -1858,7 +1858,7 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly)
if (mo->BounceFlags & BOUNCE_Actors)
{
// Bounce test and code moved to P_BounceActor
if (!P_BounceActor(mo, BlockingMobj))
if (!P_BounceActor(mo, BlockingMobj, false))
{ // Struck a player/creature
P_ExplodeMissile (mo, NULL, BlockingMobj);
}
@ -3305,10 +3305,9 @@ void AActor::Tick ()
}
z = onmo->z + onmo->height;
}
if (velz != 0 && (flags & MF_MISSILE) && (BounceFlags & BOUNCE_Actors))
if (velz != 0 && (BounceFlags & BOUNCE_Actors))
{
secplane_t plane = { 0, 0, FRACUNIT, -z, FRACUNIT };
FloorBounceMissile(plane);
P_BounceActor(this, onmo, true);
}
else
{