diff options
author | enneract <trem.redman@gmail.com> | 2014-12-20 13:33:55 +0100 |
---|---|---|
committer | enneract <trem.redman@gmail.com> | 2014-12-20 13:33:55 +0100 |
commit | 1cd59c900d16f038f13fb5f392f346cb8c2154a6 (patch) | |
tree | c8837b8082c91ab78ab9280af2db8fd7f8deaab6 /src/game/g_admin.c | |
parent | 3a7015bd646110a378c3b5f0a8638368f2827788 (diff) |
Track self damage in combat statistics.
Diffstat (limited to 'src/game/g_admin.c')
-rw-r--r-- | src/game/g_admin.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 36fa6be..90afa5c 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -4432,7 +4432,7 @@ qboolean G_admin_stats( gentity_t *ent ) if( !header ) { ADMBP( va( "^3stats: ^7combat statistics of %s^7:\n", targ->client->pers.netname ) ); - ADMBP( va( "^3%*s Dmg Acc FAc BAC FBA^7\n", + ADMBP( va( "^3%*s Dmg Acc FAc BAC FBA SAc^7\n", CSW_MAX_NAME_LEN, "Weapon" ) ); header = qtrue; } @@ -4444,7 +4444,7 @@ if( (b) == 0 ) \ ADMBP( " ^0n/a" ); \ else \ { \ - int _t = round( (float)(a)/(b) * 100.0f ); \ + int _t = MIN( (int)round( (float)(a)/(b) * 100.0f ), 999 ); \ ADMBP( va( " ^7%3d", _t ) ); \ } @@ -4452,25 +4452,36 @@ else \ cs->total - cs->friendly - cs->enemy_buildable - - cs->friendly_buildable ) + cs->friendly_buildable - + cs->self ) PRINT_ACC( cs->friendly, cs->total - cs->enemy - cs->enemy_buildable - - cs->friendly_buildable ) + cs->friendly_buildable - + cs->self ) PRINT_ACC( cs->enemy_buildable, cs->total - cs->enemy - cs->friendly - - cs->friendly_buildable ) + cs->friendly_buildable - + cs->self ) PRINT_ACC( cs->friendly_buildable, cs->total - cs->enemy - cs->enemy_buildable - - cs->friendly ) + cs->friendly - + cs->self ) + + PRINT_ACC( cs->self, + cs->total - + cs->enemy - + cs->friendly - + cs->enemy_buildable - + cs->friendly_buildable ) #undef PRINT_ACC |