]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert "Add g_cts_cptimes_onlyself cvar (needed for XDWC)"
authordrjaska <drjaska83@gmail.com>
Fri, 31 May 2024 00:22:14 +0000 (03:22 +0300)
committerdrjaska <drjaska83@gmail.com>
Fri, 31 May 2024 00:22:14 +0000 (03:22 +0300)
This reverts commit f6a061a6b48a605ff5c11058b4b1cc2462c5f607.

qcsrc/server/race.qc
qcsrc/server/race.qh

index 9f95a5a6b6b472544c007ef15e4de961f606c74c..57ea2acd81a960f11a257e7854f46ab33d65bf34 100644 (file)
@@ -238,19 +238,11 @@ void race_SendNextCheckpoint(entity e, float spec) // qualifying only
                return;
 
        int cp = e.race_checkpoint;
-        float myrecordtime = e.race_checkpoint_record[cp];
-        float recordtime;
-        string recordholder;
-        if (autocvar_g_cts_cptimes_onlyself && (race_CheckpointNetworkID(cp) < 254)) {  // cp 254 - start line, cp 255 - finish line
-          recordtime = myrecordtime;
-          recordholder = "";
-        } else {
-          recordtime = race_checkpoint_records[cp];
-
-         recordholder = race_checkpoint_recordholders[cp];
-         if(recordholder == e.netname)
+       float recordtime = race_checkpoint_records[cp];
+       float myrecordtime = e.race_checkpoint_record[cp];
+       string recordholder = race_checkpoint_recordholders[cp];
+       if(recordholder == e.netname)
                recordholder = "";
-        }
 
        if(!IS_REAL_CLIENT(e))
                return;
@@ -581,17 +573,12 @@ void race_SendTime(entity e, float cp, float t, float tvalid)
 
                if(tvalid)
                {
-                        float myrecordtime = e.race_checkpoint_record[cp];
-                        if (autocvar_g_cts_cptimes_onlyself && (race_CheckpointNetworkID(cp) < 254)) {  // cp 254 - start line, cp 255 - finish line
-                          recordtime = myrecordtime;
-                          recordholder = "";
-                        } else {
-                          recordtime = race_checkpoint_records[cp];
-                          recordholder = strcat1(race_checkpoint_recordholders[cp]); // make a tempstring copy, as we'll possibly strunzone it
-                          if(recordholder == e.netname)
+                       recordtime = race_checkpoint_records[cp];
+                       float myrecordtime = e.race_checkpoint_record[cp];
+                       recordholder = strcat1(race_checkpoint_recordholders[cp]); // make a tempstring copy, as we'll possibly strunzone it!
+                       if(recordholder == e.netname)
                                recordholder = "";
 
-                        }
                        if(t != 0)
                        {
                                if(cp == race_timed_checkpoint)
index fade8f795fa7939351fbf8f5ae65fb1b06ed53c0..e26dd5719ee6a9eda5929623b32180532c71a0af 100644 (file)
@@ -9,7 +9,6 @@ float race_teams;
 const float ST_RACE_LAPS = 1;
 
 int autocvar_g_cts_send_rankings_cnt = 15;
-bool autocvar_g_cts_cptimes_onlyself = false;
 
 int g_race_qualifying;