No contesters use the position of their broken kart on the minimap

This is instead of their flung body, which drifts significantly from where you died and muddies the "LOL YOU DIED THAT CLOSE TO THE FINISH!?" voicecall laughter moments
This commit is contained in:
toaster 2022-10-16 14:54:13 +01:00
parent 3bb78ad46d
commit fca6dc2c6f
2 changed files with 31 additions and 18 deletions

View file

@ -3470,30 +3470,35 @@ static void K_drawKartMinimap(void)
continue;
}
if (players[i].mo->health <= 0 && players[i].pflags & PF_NOCONTEST)
mobj = players[i].mo;
if (mobj->health <= 0 && (players[i].pflags & PF_NOCONTEST))
{
workingPic = kp_nocontestminimap;
R_GetTranslationColormap(0, players[i].mo->color, GTC_CACHE);
R_GetTranslationColormap(0, mobj->color, GTC_CACHE);
if (mobj->tracer && !P_MobjWasRemoved(mobj->tracer))
mobj = mobj->tracer;
}
else
{
skin = ((skin_t*)players[i].mo->skin)-skins;
skin = ((skin_t*)mobj->skin)-skins;
workingPic = faceprefix[skin][FACE_MINIMAP];
if (players[i].mo->color)
if (mobj->color)
{
if (players[i].mo->colorized)
colormap = R_GetTranslationColormap(TC_RAINBOW, players[i].mo->color, GTC_CACHE);
if (mobj->colorized)
colormap = R_GetTranslationColormap(TC_RAINBOW, mobj->color, GTC_CACHE);
else
colormap = R_GetTranslationColormap(skin, players[i].mo->color, GTC_CACHE);
colormap = R_GetTranslationColormap(skin, mobj->color, GTC_CACHE);
}
else
colormap = NULL;
}
interpx = R_InterpolateFixed(players[i].mo->old_x, players[i].mo->x);
interpy = R_InterpolateFixed(players[i].mo->old_y, players[i].mo->y);
interpx = R_InterpolateFixed(mobj->old_x, mobj->x);
interpy = R_InterpolateFixed(mobj->old_y, mobj->y);
K_drawKartMinimapIcon(interpx, interpy, x, y, splitflags, faceprefix[skin][FACE_MINIMAP], colormap, AutomapPic);
@ -3592,30 +3597,35 @@ static void K_drawKartMinimap(void)
if ((players[i].hyudorotimer > 0) && (leveltime & 1))
continue;
if (players[localplayers[i]].mo->health <= 0 && players[localplayers[i]].pflags & PF_NOCONTEST)
mobj = players[localplayers[i]].mo;
if (mobj->health <= 0 && (players[localplayers[i]].pflags & PF_NOCONTEST))
{
workingPic = kp_nocontestminimap;
R_GetTranslationColormap(0, players[localplayers[i]].mo->color, GTC_CACHE);
R_GetTranslationColormap(0, mobj->color, GTC_CACHE);
if (mobj->tracer && !P_MobjWasRemoved(mobj->tracer))
mobj = mobj->tracer;
}
else
{
skin = ((skin_t*)players[localplayers[i]].mo->skin)-skins;
skin = ((skin_t*)mobj->skin)-skins;
workingPic = faceprefix[skin][FACE_MINIMAP];
if (players[localplayers[i]].mo->color)
if (mobj->color)
{
if (players[localplayers[i]].mo->colorized)
colormap = R_GetTranslationColormap(TC_RAINBOW, players[localplayers[i]].mo->color, GTC_CACHE);
if (mobj->colorized)
colormap = R_GetTranslationColormap(TC_RAINBOW, mobj->color, GTC_CACHE);
else
colormap = R_GetTranslationColormap(skin, players[localplayers[i]].mo->color, GTC_CACHE);
colormap = R_GetTranslationColormap(skin, mobj->color, GTC_CACHE);
}
else
colormap = NULL;
}
interpx = R_InterpolateFixed(players[localplayers[i]].mo->old_x, players[localplayers[i]].mo->x);
interpy = R_InterpolateFixed(players[localplayers[i]].mo->old_y, players[localplayers[i]].mo->y);
interpx = R_InterpolateFixed(mobj->old_x, mobj->x);
interpy = R_InterpolateFixed(mobj->old_y, mobj->y);
K_drawKartMinimapIcon(interpx, interpy, x, y, splitflags, workingPic, colormap, AutomapPic);

View file

@ -1292,6 +1292,9 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
kart->old_x = target->old_x;
kart->old_y = target->old_y;
kart->old_z = target->old_z;
if (target->player->pflags & PF_NOCONTEST)
P_SetTarget(&target->tracer, kart);
}
if (source && !P_MobjWasRemoved(source))