From f96d3870103c081c404be8eeea4eae6a1ef85b10 Mon Sep 17 00:00:00 2001 From: drjaska Date: Fri, 31 May 2024 03:22:14 +0300 Subject: [PATCH] Revert "Add g_cts_cptimes_onlyself cvar (needed for XDWC)" This reverts commit f6a061a6b48a605ff5c11058b4b1cc2462c5f607. --- qcsrc/server/race.qc | 29 ++++++++--------------------- qcsrc/server/race.qh | 1 - 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index 9f95a5a6b6..57ea2acd81 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -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) diff --git a/qcsrc/server/race.qh b/qcsrc/server/race.qh index fade8f795f..e26dd5719e 100644 --- a/qcsrc/server/race.qh +++ b/qcsrc/server/race.qh @@ -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; -- 2.39.2