From: Mario Date: Thu, 3 Dec 2015 09:16:16 +0000 (+1000) Subject: Fix race and CTS modicons panel X-Git-Tag: xonotic-v0.8.2~1574 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=80861f134d2506c71c1274215b7b35088cd6c1a9;p=xonotic%2Fxonotic-data.pk3dir.git Fix race and CTS modicons panel --- diff --git a/qcsrc/client/hud/panel/modicons.qc b/qcsrc/client/hud/panel/modicons.qc index 8fab80ed6..8e3166b6a 100644 --- a/qcsrc/client/hud/panel/modicons.qc +++ b/qcsrc/client/hud/panel/modicons.qc @@ -489,7 +489,7 @@ void HUD_Mod_Race(vector pos, vector mySize) mod_active = 1; // race should never hide the mod icons panel entity me; me = playerslots[player_localnum]; - float t, score; + float score; float f; // yet another function has this score = me.(scores[ps_primary]); @@ -502,7 +502,7 @@ void HUD_Mod_Race(vector pos, vector mySize) rr = CTS_RECORD; else rr = RACE_RECORD; - t = stof(db_get(ClientProgsDB, strcat(shortmapname, rr, "time"))); + float t = stof(db_get(ClientProgsDB, strcat(shortmapname, rr, "time"))); if(score && (score < t || !t)) { db_put(ClientProgsDB, strcat(shortmapname, rr, "time"), ftos(score)); diff --git a/qcsrc/server/mutators/mutator/gamemode_cts.qc b/qcsrc/server/mutators/mutator/gamemode_cts.qc index 6d756fc67..e72d898ce 100644 --- a/qcsrc/server/mutators/mutator/gamemode_cts.qc +++ b/qcsrc/server/mutators/mutator/gamemode_cts.qc @@ -11,11 +11,12 @@ REGISTER_MUTATOR(cts, false) { if (time > 1) // game loads at time 1 error("This is a game type and it cannot be added at runtime."); - cts_Initialize(); g_race_qualifying = true; independent_players = 1; SetLimits(0, 0, 0, -1); + + cts_Initialize(); } MUTATOR_ONROLLBACK_OR_REMOVE diff --git a/qcsrc/server/mutators/mutator/gamemode_race.qc b/qcsrc/server/mutators/mutator/gamemode_race.qc index 5b6788848..b3075910c 100644 --- a/qcsrc/server/mutators/mutator/gamemode_race.qc +++ b/qcsrc/server/mutators/mutator/gamemode_race.qc @@ -10,9 +10,9 @@ REGISTER_MUTATOR(rc, false) { if (time > 1) // game loads at time 1 error("This is a game type and it cannot be added at runtime."); - race_Initialize(); rc_SetLimits(); + race_Initialize(); } MUTATOR_ONROLLBACK_OR_REMOVE