From: Dr. Jaska Date: Mon, 27 May 2024 09:19:46 +0000 (+0000) Subject: Fix own checkpoint improvements not being displayed while there is a better time... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dbb9a2292ec253474aac3d4ca559bcab379e3c65;p=xonotic%2Fxonotic-data.pk3dir.git Fix own checkpoint improvements not being displayed while there is a better time by someone else --- diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index 739eef06f..7f37db341 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -519,7 +519,6 @@ void race_SendTime(entity e, float cp, float t, float tvalid) if(tvalid) { recordtime = race_checkpoint_records[cp]; - float myrecordtime = e.race_checkpoint_record[cp]; recordholder = strcat(race_checkpoint_recordholders[cp]); // make a tempstring copy, as we'll possibly strunzone it! if(recordholder == e.netname) recordholder = ""; @@ -531,8 +530,6 @@ void race_SendTime(entity e, float cp, float t, float tvalid) race_setTime(GetMapname(), t, e.crypto_idfp, e.netname, e, true); MUTATOR_CALLHOOK(Race_FinalCheckpoint, e); } - if(t < myrecordtime || myrecordtime == 0) - e.race_checkpoint_record[cp] = t; // resending done below if(t < recordtime || recordtime == 0) { @@ -572,6 +569,14 @@ void race_SendTime(entity e, float cp, float t, float tvalid) }); } } + // check if new pb should be set for a checkpoint + if(tvalid) + { + float myrecordtime = e.race_checkpoint_record[cp]; + if(t != 0) + if(t < myrecordtime || myrecordtime == 0) + e.race_checkpoint_record[cp] = t; + } } else // RACE! Not Qualifying {