]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/race.qc
Port race_completed to ClientState and move prevorigin to the campcheck code (only...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / race.qc
index 0654c5dc74115ba7c8cc68d96bd75d098337b2c7..a17e8d745c551e45e2bf81a8325fc835913da694 100644 (file)
@@ -378,7 +378,7 @@ void race_SendTime(entity e, float cp, float t, float tvalid)
 
        if(tvalid)
        if(cp == race_timed_checkpoint) // finish line
-       if (!e.race_completed)
+       if (!CS(e).race_completed)
        {
                float s;
                if(g_race_qualifying)
@@ -404,7 +404,7 @@ void race_SendTime(entity e, float cp, float t, float tvalid)
 
                        if(race_completing)
                        {
-                               e.race_completed = 1;
+                               CS(e).race_completed = 1;
                                MAKE_INDEPENDENT_PLAYER(e);
                                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_RACE_FINISHED, e.netname);
                                ClientData_Touch(e);
@@ -1030,9 +1030,9 @@ spawnfunc(target_stopTimer) { spawnfunc_target_checkpoint(this); }
 
 void race_AbandonRaceCheck(entity p)
 {
-       if(race_completing && !p.race_completed)
+       if(race_completing && !CS(p).race_completed)
        {
-               p.race_completed = 1;
+               CS(p).race_completed = 1;
                MAKE_INDEPENDENT_PLAYER(p);
                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_RACE_ABANDONED, p.netname);
                ClientData_Touch(p);
@@ -1170,7 +1170,7 @@ float race_GetFractionalLapCount(entity e)
 
        float l;
        l = PlayerScore_Add(e, SP_RACE_LAPS, 0);
-       if(e.race_completed)
+       if(CS(e).race_completed)
                return l; // not fractional
 
        vector o0, o1;