From: terencehill Date: Mon, 28 Mar 2016 16:30:32 +0000 (+0200) Subject: Fix various warnings starting race, cts and invasion (some score types are optional... X-Git-Tag: xonotic-v0.8.2~981^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=726102df3dd9754060b36b17bacb2a443869fa01;p=xonotic%2Fxonotic-data.pk3dir.git Fix various warnings starting race, cts and invasion (some score types are optional in those game modes) race: Error: Unknown score field: 'kills' cts: Error: Unknown score field: 'suicides' cts: Error: Unknown score field: 'score' cts: fixed missing field 'fastest' inv: Error: Unknown score field: 'kills' inv: Error: Unknown score field: 'suicides' inv: Error: Unknown score field: 'score' --- diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index 7dcf98769..96dc1461c 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -303,16 +303,21 @@ void Cmd_HUD_Help() "other gamemodes except DM.\n")); } +// NOTE: adding a gametype with ? to not warn for an optional field +// make sure it's excluded in a previous exclusive rule, if any +// otherwise the previous exclusive rule warns anyway +// e.g. -teams,rc,cts,lms/kills ?+rc/kills #define HUD_DefaultColumnLayout() \ "ping pl name | " \ -"-teams,cts,lms/kills +ft,tdm/kills -teams,lms/deaths +ft,tdm/deaths -teams,lms,rc,ka/suicides +ft,tdm/suicides -cts,dm,tdm,ka,ft/frags " /* tdm already has this in "score" */ \ +"-teams,rc,cts,inv,lms/kills +ft,tdm/kills -teams,lms/deaths +ft,tdm/deaths -teams,lms,rc,cts,inv,ka/suicides +ft,tdm/suicides -cts,dm,tdm,ka,ft/frags " /* tdm already has this in "score" */ \ +"?+rc,inv/kills ?+rc,inv/suicides " \ "-rc,cts,nb/dmg -rc,cts,nb/dmgtaken " \ "+ctf/caps +ctf/pickups +ctf/fckills +ctf/returns +ons/caps +ons/takes " \ "+lms/lives +lms/rank " \ "+kh/caps +kh/pushes +kh/destroyed " \ -"?+rc/laps ?+rc/time ?+rc/fastest " \ +"?+rc/laps ?+rc/time +rc,cts/fastest " \ "+as/objectives +nb/faults +nb/goals +ka/pickups +ka/bckills +ka/bctime +ft/revivals " \ -"-lms,rc,nb/score" +"-lms,rc,cts,inv,nb/score" void Cmd_HUD_SetFields(int argc) { @@ -397,7 +402,6 @@ void Cmd_HUD_SetFields(int argc) { case "ping": hud_field[hud_num_fields] = SP_PING; break; case "pl": hud_field[hud_num_fields] = SP_PL; break; - case "pl": hud_field[hud_num_fields] = SP_PL; break; case "kd": case "kdr": case "kdratio": case "k/d": hud_field[hud_num_fields] = SP_KDRATIO; break; case "sum": case "diff": case "k-d": hud_field[hud_num_fields] = SP_SUM; break; case "name": case "nick": hud_field[hud_num_fields] = SP_NAME; have_name = true; break;