Commit 95e0a63e authored by Radicalicious's avatar Radicalicious
Browse files

Gray out emblem upon failure, fix fadeout stopping, and fix potential sound issue.

parent 9f92d432
......@@ -1191,6 +1191,7 @@ static void ST_drawInput(void)
static void ST_drawEmblemTimer(void)
{
INT32 i;
UINT8 *colormap;
// Get the lowest available time emblem's data.
tic_t lowestTics = (tic_t)UINT32_MAX;
UINT16 lowestColor = 0;
......@@ -1246,30 +1247,43 @@ static void ST_drawEmblemTimer(void)
const tic_t len = 2*TICRATE;
int vflags = 0, trans = 0;
tic_t time;
if (stplyr->exiting && stplyr->realtime >= lowestTics)
time = leveltime;
else
time = stplyr->realtime;
if (stplyr->realtime == lowestTics)
if (time == lowestTics && !stplyr->exiting)
{
//S_StartSound(NULL, sfx_s3k72); // As much as Kart sound parity would've been great, this sound is FAR too quiet to be heard ingame.
S_StartSound(NULL, sfx_spkdth); // This sound, however, is fine!
}
if (stplyr->realtime < lowestTics)
if (time < lowestTics)
{
vflags = V_GREENMAP;
else if (stplyr->realtime >= lowestTics && stplyr->realtime < start)
colormap = R_GetTranslationColormap(TC_DEFAULT, lowestColor, GTC_CACHE);
}
else if (time >= lowestTics && time < start)
{
vflags = V_REDMAP;
else if (stplyr->realtime >= start && stplyr->realtime < start + len)
colormap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_GREY, GTC_CACHE);
}
else if (time >= start && time < start + len)
{
fixed_t percent = (stplyr->realtime - start) * FRACUNIT / len;
fixed_t percent = (time - start) * FRACUNIT / len;
trans = (percent * 10 / FRACUNIT) << V_ALPHASHIFT;
vflags = V_GRAYMAP;
colormap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_GREY, GTC_CACHE);
}
else
return;
vflags |= trans;
V_DrawFixedPatch(60*FRACUNIT, 178*FRACUNIT, FRACUNIT, trans, lowestIcon, R_GetTranslationColormap(TC_DEFAULT, lowestColor, GTC_CACHE));
V_DrawFixedPatch(60*FRACUNIT, 178*FRACUNIT, FRACUNIT, trans, lowestIcon, colormap);
V_DrawThinString(88, 187, vflags, plrTimer);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment