diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_admin.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 8817432..444cff6 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -8045,15 +8045,19 @@ qboolean G_admin_versions(gentity_t *ent, int skiparg) return qtrue; } -static int calc_ff_pct(statsCounters_t *sc) { - if (sc->dmgdone + sc->structdmgdone <= 0) { - if (sc->ffdmgdone <= 0) +static int calc_ff_pct( statsCounters_t *sc ) +{ + if ( sc->dmgdone + sc->structdmgdone <= 0 ) + { + if ( sc->ffdmgdone <= 0 ) return 0; else return 100; - } // else { - // return round((float)sc->ffdmgdone / (sc->ffdmgdone + sc->dmgdone + sc->structdmgdone) * 100); - // } + } + else + { + return round((float)sc->ffdmgdone / (sc->ffdmgdone + sc->dmgdone + sc->structdmgdone) * 100); + } } qboolean G_admin_showff(gentity_t *ent, int skiparg) |