Fix race and CTS modicons panel
authorMario <mario@smbclan.net>
Thu, 3 Dec 2015 09:16:16 +0000 (19:16 +1000)
committerMario <mario@smbclan.net>
Thu, 3 Dec 2015 09:16:16 +0000 (19:16 +1000)
qcsrc/client/hud/panel/modicons.qc
qcsrc/server/mutators/mutator/gamemode_cts.qc
qcsrc/server/mutators/mutator/gamemode_race.qc

index 8fab80e..8e3166b 100644 (file)
@@ -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));
index 6d756fc..e72d898 100644 (file)
@@ -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
index 5b67888..b307591 100644 (file)
@@ -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