1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-12 16:18:00 -05:00

Encounter: improve countdown HUD

This commit is contained in:
Jbleezy
2022-02-08 23:13:15 -08:00
parent 8762a31ac7
commit 5dc650259b

View File

@ -1161,35 +1161,14 @@ round_start_countdown_hud_end_game_watcher()
round_start_countdown_hud_timer(time) round_start_countdown_hud_timer(time)
{ {
level endon( "end_game" ); level endon("end_game");
timer = time; while(time > 0)
while ( true )
{ {
self setValue( timer ); self setvalue(time);
self thread maps/mp/gametypes_zm/_hud::fontpulse(level);
wait 1; wait 1;
timer--; time--;
if ( timer <= 5 )
{
self thread countdown_pulse( self, timer );
break;
}
}
}
countdown_pulse( hud_elem, duration )
{
level endon( "end_game" );
waittillframeend;
while ( duration > 0 && !level.gameended )
{
hud_elem thread maps/mp/gametypes_zm/_hud::fontpulse( level );
wait ( hud_elem.inframes * 0.05 );
hud_elem setvalue( duration );
duration--;
wait ( 1 - ( hud_elem.inframes * 0.05 ) );
} }
} }