]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into drjaska/g_cts_cptimes_onlyself
authordrjaska <drjaska83@gmail.com>
Mon, 27 May 2024 13:16:45 +0000 (16:16 +0300)
committerdrjaska <drjaska83@gmail.com>
Mon, 27 May 2024 13:23:07 +0000 (16:23 +0300)
1  2 
qcsrc/server/race.qc

index 90b28190b1842fe64706783d7635ff53730f5ac3,7f37db341cb78479fcbea450060eb97638f1d140..089c483550454c5af81b9ce9def3d5560ef41d0a
@@@ -526,18 -518,11 +526,22 @@@ void race_SendTime(entity e, float cp, 
  
                if(tvalid)
                {
-                       float myrecordtime = e.race_checkpoint_record[cp];
-                       if (autocvar_g_race_cptimes_onlyself) {
-                               recordtime = myrecordtime;
 -                      recordtime = race_checkpoint_records[cp];
 -                      recordholder = strcat(race_checkpoint_recordholders[cp]); // make a tempstring copy, as we'll possibly strunzone it!
 -                      if(recordholder == e.netname)
++                      if (autocvar_g_race_cptimes_onlyself)
++                      {
++                              // return their own checkpoint time
++                              recordtime = e.race_checkpoint_record[cp];
                                recordholder = "";
-                       } else {
++                      }
++                      else
++                      {
 +                              recordtime = race_checkpoint_records[cp];
 +                              // make a tempstring copy, as we'll possibly strunzone it
 +                              recordholder = strcat(race_checkpoint_recordholders[cp]);
 +
 +                              if(recordholder == e.netname)
 +                                      recordholder = "";
 +                      }
                        if(t != 0)
                        {
                                if(cp == race_timed_checkpoint)