From 45310d9d3e4d0c34970ab93663d73aabae91091b Mon Sep 17 00:00:00 2001 From: Debugger Date: Sat, 27 Apr 2013 14:42:40 +0200 Subject: [PATCH] simplified, parallel to SP_FRAGS now --- qcsrc/client/scoreboard.qc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index 3c2552472..77b3538c7 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -588,20 +588,17 @@ string HUD_GetField(entity pl, float field) return str; case SP_NET: - num = pl.(scores[SP_KILLS]) - pl.(scores[SP_SUICIDES]); - denom = pl.(scores[SP_DEATHS]); + f = pl.(scores[SP_KILLS]); + f -= pl.(scores[SP_SUICIDES]); - if((num - denom) > 0) { + if(f > 0) { hud_field_rgb = '0 1 0'; - str = sprintf("%d", (num - denom)); - } else if((num - denom) == 0) { + } else if(f == 0) { hud_field_rgb = '1 1 1'; - str = sprintf("%d", (num - denom)); } else { hud_field_rgb = '1 0 0'; - str = sprintf("%d", (num - denom)); } - return str; + return ftos(f); default: tmp = pl.(scores[field]); -- 2.39.2