Merge branch 'death-visibility' into 'master'

Try to keep death frames on-screen

See merge request KartKrew/Kart!1638
This commit is contained in:
Oni 2023-11-17 08:25:11 +00:00
commit 6f37e4340f

View file

@ -1889,18 +1889,22 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
} }
else else
{ {
flingAngle = target->angle + ANGLE_180; flingAngle = target->angle;
if (P_RandomByte(PR_ITEM_RINGS) & 1) if (P_RandomByte(PR_ITEM_RINGS) & 1)
{ {
flingAngle -= ANGLE_45; flingAngle -= ANGLE_45/2;
} }
else 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_InstaThrust(target, flingAngle, 14 * target->scale);
P_SetObjectMomZ(target, 14*FRACUNIT, false); P_SetObjectMomZ(target, 14*FRACUNIT, false);