]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/race.qc
Step 5: complete
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / race.qc
index 6fc5cf712a1cdd572d091781a74f5228ac34a0f0..f729137a61542fd61a8861dfccc49e9a5d0282b9 100644 (file)
@@ -457,17 +457,17 @@ void race_SendTime(entity e, float cp, float t, float tvalid)
        }
        else // RACE! Not Qualifying
        {
-               float lself, lother, othtime;
+               float mylaps, lother, othtime;
                entity oth;
                oth = race_checkpoint_lastplayers[cp];
                if(oth)
                {
-                       lself = PlayerScore_Add(e, SP_RACE_LAPS, 0);
+                       mylaps = PlayerScore_Add(e, SP_RACE_LAPS, 0);
                        lother = race_checkpoint_lastlaps[cp];
                        othtime = race_checkpoint_lasttimes[cp];
                }
                else
-                       lself = lother = othtime = 0;
+                       mylaps = lother = othtime = 0;
 
                if(IS_REAL_CLIENT(e))
                {
@@ -485,7 +485,7 @@ void race_SendTime(entity e, float cp, float t, float tvalid)
                                else
                                {
                                        WriteInt24_t(MSG_ONE, TIME_ENCODE(time - race_checkpoint_lasttimes[cp]));
-                                       WriteByte(MSG_ONE, lself - lother);
+                                       WriteByte(MSG_ONE, mylaps - lother);
                                        WriteString(MSG_ONE, oth.netname); // record holder
                                }
                        });
@@ -493,7 +493,7 @@ void race_SendTime(entity e, float cp, float t, float tvalid)
 
                race_checkpoint_lastplayers[cp] = e;
                race_checkpoint_lasttimes[cp] = time;
-               race_checkpoint_lastlaps[cp] = lself;
+               race_checkpoint_lastlaps[cp] = mylaps;
 
                if(IS_REAL_CLIENT(oth))
                {
@@ -511,7 +511,7 @@ void race_SendTime(entity e, float cp, float t, float tvalid)
                                else
                                {
                                        WriteInt24_t(MSG_ONE, TIME_ENCODE(time - othtime));
-                                       WriteByte(MSG_ONE, lother - lself);
+                                       WriteByte(MSG_ONE, lother - mylaps);
                                        WriteString(MSG_ONE, e.netname); // record holder
                                }
                        });