- Fixed: BOUNCE_AutoOff should not trigger when bouncing off a ceiling, since it will always pass the velocity check.

SVN r3643 (trunk)
This commit is contained in:
Randy Heit 2012-05-12 23:21:22 +00:00
parent da08b14895
commit f421f2411d

View file

@ -1376,8 +1376,8 @@ bool AActor::FloorBounceMissile (secplane_t &plane)
if (abs(velz) < (fixed_t)(Mass * GetGravity() / 64)) if (abs(velz) < (fixed_t)(Mass * GetGravity() / 64))
velz = 0; velz = 0;
} }
else if (BounceFlags & BOUNCE_AutoOff) else if (plane.c > 0 && BounceFlags & BOUNCE_AutoOff)
{ { // AutoOff only works when bouncing off a floor, not a ceiling.
if (!(flags & MF_NOGRAVITY) && (velz < 3*FRACUNIT)) if (!(flags & MF_NOGRAVITY) && (velz < 3*FRACUNIT))
BounceFlags &= ~BOUNCE_TypeMask; BounceFlags &= ~BOUNCE_TypeMask;
} }