]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh
Create the g_race_targets, g_racecheckpoints and g_kaballs intrusive lists only when...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / ctf / sv_ctf.qh
index b1518bd4fc1825df24868ce50597f31cb1368d4c..519cbd0648f49eaaaffceb7863fc4f2abea24ed2 100644 (file)
@@ -1,9 +1,20 @@
 #pragma once
 
 #include "ctf.qh"
+#include <common/items/item/pickup.qh>
+#include <common/mutators/base.qh>
+#include <common/gamemodes/sv_rules.qh>
 
+CLASS(Flag, Pickup)
+    ATTRIB(Flag, m_mins, vector, (PL_MIN_CONST + '0 0 -13') * 1.4); // scaling be damned
+    ATTRIB(Flag, m_maxs, vector, (PL_MAX_CONST + '0 0 -13') * 1.4);
+ENDCLASS(Flag)
+Flag CTF_FLAG;
 void ctf_Initialize();
 
+int autocvar_captureleadlimit_override;
+int autocvar_capturelimit_override;
+
 REGISTER_MUTATOR(ctf, false)
 {
     MUTATOR_STATIC();
@@ -24,12 +35,6 @@ void ctf_RespawnFlag(entity flag);
 // score rule declarations
 const int ST_CTF_CAPS = 1;
 
-CLASS(Flag, Pickup)
-    ATTRIB(Flag, m_mins, vector, (PL_MIN_CONST + '0 0 -13') * 1.4); // scaling be damned
-    ATTRIB(Flag, m_maxs, vector, (PL_MAX_CONST + '0 0 -13') * 1.4);
-ENDCLASS(Flag)
-Flag CTF_FLAG;
-STATIC_INIT(Flag) { CTF_FLAG = NEW(Flag); }
 void ctf_FlagTouch(entity this, entity toucher) { ITEM_HANDLE(Pickup, CTF_FLAG, this, toucher); }
 
 // flag constants // for most of these, there is just one question to be asked: WHYYYYY?
@@ -73,6 +78,9 @@ const float VEHICLE_FLAG_SCALE = 1.0;
 .float score_return;
 .float score_team_capture; // shouldn't be too high
 
+// property set on objects to point to the flag they're carrying (if any)
+.entity flagcarried;
+
 // effects
 .string toucheffect;
 .string passeffect;