mirror of
https://github.com/nzp-team/dquakeplus.git
synced 2024-11-22 03:41:35 +00:00
Round HUD Time Adjustment
This commit is contained in:
parent
0d2a2efd1d
commit
598136d69b
1 changed files with 25 additions and 4 deletions
|
@ -595,6 +595,7 @@ float color_shift_end[3];
|
|||
float color_shift_steps[3];
|
||||
int color_shift_init;
|
||||
int blinking;
|
||||
float endroundchange;
|
||||
int textstate;
|
||||
int value, value2;
|
||||
|
||||
|
@ -781,8 +782,16 @@ void HUD_Rounds (void)
|
|||
}
|
||||
else if (cl.stats[STAT_ROUNDCHANGE] == 4)//blink white
|
||||
{
|
||||
blinking = ((int)(realtime*1000)&510) - 255;
|
||||
blinking = abs(blinking);
|
||||
if (endroundchange > cl.time) {
|
||||
blinking = (((int)(realtime*475)&510) - 255);
|
||||
blinking = abs(blinking);
|
||||
} else {
|
||||
if (blinking)
|
||||
blinking = blinking - 1;
|
||||
else
|
||||
blinking = 0;
|
||||
}
|
||||
|
||||
if (cl.stats[STAT_ROUNDS] > 0 && cl.stats[STAT_ROUNDS] < 11)
|
||||
{
|
||||
for (i = 0; i < cl.stats[STAT_ROUNDS]; i++)
|
||||
|
@ -832,6 +841,11 @@ void HUD_Rounds (void)
|
|||
Draw_ColorPic (2 + x_offset, vid.height - sb_round_num[num[0]]->height - 4, sb_round_num[num[0]], 255, 255, 255, blinking);
|
||||
x_offset = x_offset + sb_round_num[num[0]]->width - 8;
|
||||
}
|
||||
|
||||
if (endroundchange == 0) {
|
||||
endroundchange = cl.time + 7.5;
|
||||
blinking = 0;
|
||||
}
|
||||
}
|
||||
else if (cl.stats[STAT_ROUNDCHANGE] == 5)//blink white
|
||||
{
|
||||
|
@ -891,9 +905,16 @@ void HUD_Rounds (void)
|
|||
}
|
||||
else if (cl.stats[STAT_ROUNDCHANGE] == 6)//blink white while fading back
|
||||
{
|
||||
if (endroundchange) {
|
||||
endroundchange = 0;
|
||||
blinking = 0;
|
||||
}
|
||||
|
||||
color_shift_init = 0;
|
||||
blinking = ((int)(realtime*1000)&510) - 255;
|
||||
blinking = abs(blinking);
|
||||
|
||||
blinking += (int)(host_frametime*475);
|
||||
if (blinking > 255) blinking = 255;
|
||||
|
||||
if (cl.stats[STAT_ROUNDS] > 0 && cl.stats[STAT_ROUNDS] < 11)
|
||||
{
|
||||
for (i = 0; i < cl.stats[STAT_ROUNDS]; i++)
|
||||
|
|
Loading…
Reference in a new issue