From f5c4bc00cf6307c14a6037a1f0a68259e4fe2ac8 Mon Sep 17 00:00:00 2001 From: enneract Date: Sat, 20 Dec 2014 19:06:32 +0100 Subject: Improve the output of /stats. --- src/game/g_combat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game/g_combat.c') diff --git a/src/game/g_combat.c b/src/game/g_combat.c index a40f7a7..7713d2a 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -1940,7 +1940,7 @@ void G_CalculateCombatRanks( void ) samples[ sample_count++ ].value = ranks->effs[ dmgtype ]; } - if( !sample_count ) + if( sample_count < 2 ) continue; qsort( samples, sample_count, sizeof( csrSample_t ), (int(*)(const void*,const void*))csrSampleCmp ); @@ -1952,6 +1952,7 @@ void G_CalculateCombatRanks( void ) if( i > 0 && fabs( last - samples[ i ].value ) > 1.0e-5 ) rank++; + ranks->ranked[ dmgtype ] = qtrue; ranks->effs_pc[ dmgtype ] = rank; last = samples[ i ].value; -- cgit