Added flags for angle handling on bounce
Allows for keeping the current angle on bounce or modifying the pitch.
This commit is contained in:
parent
3d2f9e06ed
commit
e0394ef16a
4 changed files with 20 additions and 5 deletions
|
|
@ -1824,7 +1824,8 @@ bool AActor::FloorBounceMissile (secplane_t &plane, bool is3DFloor)
|
|||
if (BounceFlags & (BOUNCE_HereticType | BOUNCE_MBF))
|
||||
{
|
||||
Vel -= norm * dot;
|
||||
AngleFromVel();
|
||||
if (!(BounceFlags & BOUNCE_KeepAngle))
|
||||
AngleFromVel();
|
||||
if (!(BounceFlags & BOUNCE_MBF)) // Heretic projectiles die, MBF projectiles don't.
|
||||
{
|
||||
flags |= MF_INBOUNCE;
|
||||
|
|
@ -1838,9 +1839,13 @@ bool AActor::FloorBounceMissile (secplane_t &plane, bool is3DFloor)
|
|||
{
|
||||
// The reflected velocity keeps only about 70% of its original speed
|
||||
Vel = (Vel - norm * dot) * bouncefactor;
|
||||
AngleFromVel();
|
||||
if (!(BounceFlags & BOUNCE_KeepAngle))
|
||||
AngleFromVel();
|
||||
}
|
||||
|
||||
if (BounceFlags & BOUNCE_ModifyPitch)
|
||||
Angles.Pitch = -VecToAngle(Vel.XY().Length(), Vel.Z);
|
||||
|
||||
PlayBounceSound(true, 1.0);
|
||||
|
||||
// Set bounce state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue