diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-10-25 16:43:39 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-10-25 16:43:39 +0000 |
commit | 8a4e5f5516e94fe901a332bce7eef9b824f225c6 (patch) | |
tree | 93d64ca93047c6b1c1b59658e950ab0062544fe9 /source/cl_scrn.c | |
parent | b7d3939f3f68617f80d74d0a2bf6ea34ddea1065 (diff) |
Progress meter now works for local MVDs again.
Implemented `mvdskip' command which allows one jump to the next map in a MVD.
Removed `mvd_shownet' debugging stuff from dedicated server build.
Dropped packets no longer have maximum height on the lagometer.
Diffstat (limited to 'source/cl_scrn.c')
-rw-r--r-- | source/cl_scrn.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/source/cl_scrn.c b/source/cl_scrn.c index e3dd6ca..18f4602 100644 --- a/source/cl_scrn.c +++ b/source/cl_scrn.c @@ -194,7 +194,7 @@ static void SCR_DrawPercentBar( int percent ) { R_DrawFill( 0, scr_hudHeight, w, CHAR_HEIGHT, 4 ); R_DrawFill( w, scr_hudHeight, scr_hudWidth - w, CHAR_HEIGHT, 0 ); - length = sprintf( buffer, "%d%%", percent ); + length = Q_snprintf( buffer, sizeof( buffer ), "%d%%", percent ); x = ( scr_hudWidth - length * CHAR_WIDTH ) / 2; R_DrawString( x, scr_hudHeight, 0, MAX_STRING_CHARS, buffer, scr_font ); } @@ -205,7 +205,7 @@ SCR_DrawDemoBar ================ */ static void SCR_DrawDemoBar( void ) { - //int percent, bufferPercent; + int percent; if( !scr_demobar->integer ) { return; @@ -217,23 +217,18 @@ static void SCR_DrawDemoBar( void ) { } return; } -#if 0 + +#if USE_MVD_CLIENT if( sv_running->integer != ss_broadcast ) { return; } - if( !MVD_GetDemoPercent( &percent, &bufferPercent ) ) { + if( ( percent = MVD_GetDemoPercent() ) == -1 ) { return; } - if( scr_demobar->integer & 1 ) { - SCR_DrawPercentBar( percent ); - } - if( scr_demobar->integer & 2 ) { - SCR_DrawPercentBar( bufferPercent ); - } + SCR_DrawPercentBar( percent ); #endif - } /* |