diff options
author | IronClawTrem <louie.nutman@gmail.com> | 2020-03-01 16:51:00 +0000 |
---|---|---|
committer | IronClawTrem <louie.nutman@gmail.com> | 2020-03-01 16:51:00 +0000 |
commit | 70144bcabe5185051594292181d6827ab9ae278c (patch) | |
tree | aa122f5136ec11765b5650d2d94d8027f1f41fe3 /src | |
parent | f15ee5ac6702e14a827a2643bfa893796c5659df (diff) |
make !showff return a value
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) |