P_DoSpringEx: Only permit new detaching from ground if the spring has a vertical component to its momentum

This commit is contained in:
toaster 2025-08-01 14:02:51 +01:00
parent efd7442c65
commit 763b9e970a

View file

@ -272,22 +272,22 @@ P_DoSpringEx
return; return;
} }
object->eflags |= MFE_SPRUNG; // apply this flag asap!
if (horizspeed < 0) if (horizspeed < 0)
{ {
horizspeed = -(horizspeed); horizspeed = -(horizspeed);
finalAngle += ANGLE_180; finalAngle += ANGLE_180;
} }
object->standingslope = NULL; // Okay, now we know it's not going to be relevant - no launching off at silly angles for you.
object->terrain = NULL;
object->eflags |= MFE_SPRUNG; // apply this flag asap!
if ((vertispeed < 0) ^ P_IsObjectFlipped(object))
vertispeed *= 2;
if (vertispeed) if (vertispeed)
{ {
object->standingslope = NULL; // Okay, now we know it's not going to be relevant - no launching off at silly angles for you.
object->terrain = NULL;
if ((vertispeed < 0) ^ P_IsObjectFlipped(object))
vertispeed *= 2;
object->momz = FixedMul(vertispeed, scaleVal); object->momz = FixedMul(vertispeed, scaleVal);
} }