mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Intermission teamscore fixup
This commit is contained in:
parent
adff23f106
commit
b8a4d21ba5
3 changed files with 24 additions and 16 deletions
|
|
@ -3540,7 +3540,7 @@ static tic_t scorechangecooldown = 0;
|
|||
// but HUD hooks run at variable timing based on your actual framerate.
|
||||
static tic_t teams_lastleveltime = 0;
|
||||
|
||||
void K_drawKartTeamScores(boolean fromintermission)
|
||||
void K_drawKartTeamScores(boolean fromintermission, INT32 interoffset)
|
||||
{
|
||||
if (G_GametypeHasTeams() == false)
|
||||
{
|
||||
|
|
@ -3563,12 +3563,6 @@ void K_drawKartTeamScores(boolean fromintermission)
|
|||
if (use4p)
|
||||
snapflags = V_SNAPTOTOP;
|
||||
|
||||
if (fromintermission)
|
||||
{
|
||||
use4p = true;
|
||||
snapflags = 0;
|
||||
}
|
||||
|
||||
flags |= snapflags;
|
||||
|
||||
// bar stuff, relative to base
|
||||
|
|
@ -3612,6 +3606,14 @@ void K_drawKartTeamScores(boolean fromintermission)
|
|||
faceoff = 4;
|
||||
}
|
||||
|
||||
if (fromintermission)
|
||||
{
|
||||
use4p = true;
|
||||
snapflags = 0;
|
||||
flags = 0;
|
||||
basex += interoffset;
|
||||
}
|
||||
|
||||
UINT8 allies = stplyr->team;
|
||||
UINT8 enemies = (allies == TEAM_ORANGE) ? TEAM_BLUE : TEAM_ORANGE;
|
||||
|
||||
|
|
@ -3698,10 +3700,13 @@ void K_drawKartTeamScores(boolean fromintermission)
|
|||
}
|
||||
}
|
||||
|
||||
if (!fromintermission)
|
||||
{
|
||||
// replace scores with eased scores
|
||||
allyscore = easedallyscore;
|
||||
enemyscore = totalscore - allyscore;
|
||||
}
|
||||
}
|
||||
|
||||
teams_lastleveltime = leveltime;
|
||||
|
||||
|
|
@ -3756,8 +3761,8 @@ void K_drawKartTeamScores(boolean fromintermission)
|
|||
if (!fromintermission)
|
||||
{
|
||||
flags |= V_SNAPTOBOTTOM;
|
||||
}
|
||||
flags &= ~V_SNAPTOTOP;
|
||||
}
|
||||
basey = 170;
|
||||
}
|
||||
|
||||
|
|
@ -3768,8 +3773,10 @@ void K_drawKartTeamScores(boolean fromintermission)
|
|||
if (!use4p)
|
||||
V_DrawScaledPatch(basex, basey, flags, kp_team_you);
|
||||
|
||||
if (V_GetHUDTranslucency(0) != 10)
|
||||
/*
|
||||
if (V_GetHUDTranslucency(0) != 10 || fromintermission)
|
||||
return;
|
||||
*/
|
||||
|
||||
V_DrawFill(basex+barx, basey+bary, enemywidth, barheight, enemyfill|flags);
|
||||
V_DrawFill(basex+barx+enemywidth, basey+bary, allywidth, barheight, allyfill|flags);
|
||||
|
|
@ -7589,7 +7596,7 @@ void K_drawKartHUD(void)
|
|||
}
|
||||
}
|
||||
|
||||
K_drawKartTeamScores(false);
|
||||
K_drawKartTeamScores(false, 0);
|
||||
|
||||
if (K_InRaceDuel())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ position_t K_GetKartObjectPosToMinimapPos(fixed_t objx, fixed_t objy);
|
|||
|
||||
INT32 K_DrawGameControl(UINT16 x, UINT16 y, UINT8 player, const char *str, UINT8 alignment, UINT8 font, UINT32 flags);
|
||||
|
||||
void K_drawKartTeamScores(boolean fromintermission);
|
||||
void K_drawKartTeamScores(boolean fromintermission, INT32 interoffset);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
|
|
|||
|
|
@ -1928,6 +1928,9 @@ void Y_IntermissionDrawer(void)
|
|||
// Returns early if there's no players to draw
|
||||
Y_PlayerStandingsDrawer(&data, x);
|
||||
|
||||
if ((intertic - sorttic) < 8)
|
||||
K_drawKartTeamScores(true, x);
|
||||
|
||||
// Draw bottom (and top) pieces
|
||||
skiptallydrawer:
|
||||
if (!LUA_HudEnabled(hud_intermissionmessages))
|
||||
|
|
@ -1949,8 +1952,6 @@ finalcounter:
|
|||
if ((modeattacking == ATTACKING_NONE) && demo.recording)
|
||||
ST_DrawSaveReplayHint(0);
|
||||
|
||||
K_drawKartTeamScores(true);
|
||||
|
||||
if (Y_CanSkipIntermission())
|
||||
{
|
||||
const tic_t end = roundqueue.size != 0 ? 3*TICRATE : TICRATE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue