diff --git a/code/cgame/cg_local.h b/code/cgame/cg_local.h index bcd6499..d43dbf7 100644 --- a/code/cgame/cg_local.h +++ b/code/cgame/cg_local.h @@ -1477,6 +1477,7 @@ typedef struct { int csStatus; int hitBeep[ WP_NUM_WEAPONS ]; int overtime; + int instagib; } cgs_t; //============================================================================== diff --git a/code/cgame/cg_scoreboard.c b/code/cgame/cg_scoreboard.c index 69d0e72..92cffd6 100644 --- a/code/cgame/cg_scoreboard.c +++ b/code/cgame/cg_scoreboard.c @@ -147,13 +147,18 @@ static void CG_DrawClientScore( int x, int y, int w, int h, score_t *score, floa CG_DrawStringExt( x + w*0.5, y - SB_MEDCHAR_HEIGHT/2, va( "%i / %i / %i", score->captures, score->assistCount, score->defendCount ), colorWhite, qtrue, qfalse, SB_CHAR_WIDTH, SB_CHAR_HEIGHT, 0 ); } - if( h >= SB_CHAR_HEIGHT*2 ){ - CG_DrawStringExt( x + w*0.66, y - SB_CHAR_HEIGHT, CG_FormatDmg(score->dmgdone), colorGreen, qtrue, qfalse, SB_CHAR_WIDTH, SB_CHAR_HEIGHT, 0 ); - CG_DrawStringExt( x + w*0.66, y, CG_FormatDmg(score->dmgtaken), colorRed, qtrue, qfalse, SB_CHAR_WIDTH, SB_CHAR_HEIGHT, 0 ); - }else{ - strcpy( string, va( "^2%s^7/^1%s", CG_FormatDmg(score->dmgdone), CG_FormatDmg(score->dmgtaken) ) ); - CG_DrawStringExt( x + w*0.66, y - SB_CHAR_HEIGHT/2, string, colorWhite, qfalse, qfalse, SB_CHAR_WIDTH, SB_CHAR_HEIGHT, 0 ); - } + if (cgs.instagib == 1) { + strcpy( string, va( "%i%% Acc", ( ( int )( 100*( float )score->accuracys[ WP_RAILGUN ][ 1 ]/( float )score->accuracys[ WP_RAILGUN ][ 0 ] ) ) ) ); + CG_DrawStringExt( x + w*0.66, y - SB_CHAR_HEIGHT/2, string, colorWhite, qfalse, qfalse, SB_CHAR_WIDTH, SB_CHAR_HEIGHT, 0 ); + } else { + if( h >= SB_CHAR_HEIGHT*2 ){ + CG_DrawStringExt( x + w*0.66, y - SB_CHAR_HEIGHT, CG_FormatDmg(score->dmgdone), colorGreen, qtrue, qfalse, SB_CHAR_WIDTH, SB_CHAR_HEIGHT, 0 ); + CG_DrawStringExt( x + w*0.66, y, CG_FormatDmg(score->dmgtaken), colorRed, qtrue, qfalse, SB_CHAR_WIDTH, SB_CHAR_HEIGHT, 0 ); + }else{ + strcpy( string, va( "^2%s^7/^1%s", CG_FormatDmg(score->dmgdone), CG_FormatDmg(score->dmgtaken) ) ); + CG_DrawStringExt( x + w*0.66, y - SB_CHAR_HEIGHT/2, string, colorWhite, qfalse, qfalse, SB_CHAR_WIDTH, SB_CHAR_HEIGHT, 0 ); + } + } if( h >= SB_CHAR_HEIGHT*2 ){ CG_DrawStringExt( x + w*0.74, y - SB_CHAR_HEIGHT, CG_FormatKD( score->frags ), colorGreen, qtrue, qfalse, SB_CHAR_WIDTH, SB_CHAR_HEIGHT, 0 ); diff --git a/code/cgame/cg_servercmds.c b/code/cgame/cg_servercmds.c index 3a692e4..96d39f2 100644 --- a/code/cgame/cg_servercmds.c +++ b/code/cgame/cg_servercmds.c @@ -1052,6 +1052,7 @@ void CG_ParseServerinfo ( void ) { cgs.maxclients = atoi ( Info_ValueForKey ( info, "sv_maxclients" ) ); cgs.roundtime = atoi ( Info_ValueForKey ( info, "elimination_roundtime" ) ); cgs.nopickup = atoi ( Info_ValueForKey ( info, "g_rockets" ) ) + atoi ( Info_ValueForKey ( info, "g_instantgib" ) ) + atoi ( Info_ValueForKey ( info, "g_elimination" ) ); + cgs.instagib = atoi ( Info_ValueForKey ( info, "g_instantgib" ) ) ; cgs.lms_mode = atoi ( Info_ValueForKey ( info, "g_lms_mode" ) ); cgs.altExcellent = atoi ( Info_ValueForKey ( info, "g_altExcellent" ) ); cgs.overtime = atoi ( Info_ValueForKey( info, "g_overtime" ) ); diff --git a/code/game/g_svcmds_ext.c b/code/game/g_svcmds_ext.c index aab30a7..e4e3613 100644 --- a/code/game/g_svcmds_ext.c +++ b/code/game/g_svcmds_ext.c @@ -24,6 +24,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "g_local.h" + +// forward declare +void default_Svcmd_Status_f(); + /* ============ Svcmd_status_f @@ -31,6 +35,11 @@ Does Server Status from Console ============ */ void Svcmd_Status_f( void ) +{ + default_Svcmd_Status_f(); +} + +void default_Svcmd_Status_f( void ) { int i; gclient_t *cl;