]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/race.qc
Kill another gamemode specific check
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / race.qc
index fbf1eaa185af29a2b6a5d3ab61b72410e6763e6c..4f8298238fcaf7755799c08ea0af8cd84e56a0d0 100644 (file)
@@ -1,5 +1,4 @@
 #include "race.qh"
-#include "_all.qh"
 
 #include "cl_client.qh"
 #include "portals.qh"
@@ -8,10 +7,13 @@
 #include "bot/waypoints.qh"
 #include "bot/navigation.qh"
 #include "command/getreplies.qh"
-#include "../common/deathtypes.qh"
+#include "../common/deathtypes/all.qh"
 #include "../common/notifications.qh"
 #include "../common/mapinfo.qh"
-#include "../warpzonelib/util_server.qh"
+#include "../common/triggers/subs.qh"
+#include "../lib/warpzone/util_server.qh"
+#include "../lib/warpzone/common.qh"
+#include "../common/mutators/mutator/waypoints/waypointsprites.qh"
 
 void W_Porto_Fail(float failhard);
 
@@ -414,10 +416,7 @@ void race_SendTime(entity e, float cp, float t, float tvalid)
                                if(cp == race_timed_checkpoint)
                                {
                                        race_setTime(GetMapname(), t, e.crypto_idfp, e.netname, e);
-                                       if(g_cts && autocvar_g_cts_finish_kill_delay)
-                                       {
-                                               CTS_ClientKill(e);
-                                       }
+                                       MUTATOR_CALLHOOK(Race_FinalCheckpoint, e);
                                }
                                if(t < recordtime || recordtime == 0)
                                {
@@ -704,7 +703,7 @@ void checkpoint_passed()
        else
        {
                if(self.spawnflags & 4)
-                       Damage (other, self, self, 10000, DEATH_HURTTRIGGER, other.origin, '0 0 0');
+                       Damage (other, self, self, 10000, DEATH_HURTTRIGGER.m_id, other.origin, '0 0 0');
        }
 }
 
@@ -1143,6 +1142,9 @@ void penalty_use()
 
 spawnfunc(trigger_race_penalty)
 {
+       // TODO: find out why this wasnt done:
+       //if(!g_cts && !g_race) { remove(self); return; }
+
        EXACTTRIGGER_INIT;
 
        self.use = penalty_use;