Try to keep death frames on-screen

This commit is contained in:
AJ Martinez 2023-11-16 14:42:15 -07:00
parent b772a66541
commit 5e92177262

View file

@ -1889,18 +1889,22 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
}
else
{
flingAngle = target->angle + ANGLE_180;
flingAngle = target->angle;
if (P_RandomByte(PR_ITEM_RINGS) & 1)
{
flingAngle -= ANGLE_45;
flingAngle -= ANGLE_45/2;
}
else
{
flingAngle += ANGLE_45;
flingAngle += ANGLE_45/2;
}
}
// On -20 ring deaths, you're guaranteed to be hitting the ground from Tumble,
// so make sure that this draws at the correct angle.
target->rollangle = 0;
P_InstaThrust(target, flingAngle, 14 * target->scale);
P_SetObjectMomZ(target, 14*FRACUNIT, false);