]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 8fab80ed6170b0dc93e19877d994f64be9be6f56..8e3166b6ad8f23ef803bc0a779fdaf83c6cd0798 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 6d756fc679b615c74b878927f51838d1ab9aa72b..e72d898ce09b7dd0b86e5230a17cbeac27ae5aad 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 5b67888485d450dd4a8bdde5f5495cd746188f52..b3075910cb31dd4f8c15baf663410c42edd21544 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