]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator/gamemode_ctf.qh
Merge branch 'master' into Lyberta/StandaloneOverkillWeapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator / gamemode_ctf.qh
index 2c67372b4f6232511dcc0c50cd315a61fa1d63b8..33d64a074a290610fdb43a45dbfa7f08a996ede4 100644 (file)
@@ -3,6 +3,23 @@
 #ifdef SVQC
 
 #include "../gamemode.qh"
+
+void ctf_Initialize();
+
+REGISTER_MUTATOR(ctf, false)
+{
+    MUTATOR_STATIC();
+    MUTATOR_ONADD
+    {
+        GameRules_teams(true);
+        GameRules_limit_score(autocvar_capturelimit_override);
+        GameRules_limit_lead(autocvar_captureleadlimit_override);
+
+        ctf_Initialize();
+    }
+    return 0;
+}
+
 // used in cheats.qc
 void ctf_RespawnFlag(entity flag);
 
@@ -67,7 +84,6 @@ entity ctf_worldflaglist;
 .entity ctf_staleflagnext;
 
 // waypoint sprites
-.entity bot_basewaypoint; // flag waypointsprite
 .entity wps_helpme;
 .entity wps_flagbase;
 .entity wps_flagcarrier;
@@ -117,6 +133,7 @@ float ctf_captimerecord; // record time for capturing the flag
 .float next_take_time;
 .bool ctf_flagdamaged_byworld;
 int ctf_teams;
+.entity enemy; // when flag is back in the base, it remembers last player who carried/touched the flag, useful to bots
 
 // passing/throwing properties
 .float pass_distance;
@@ -146,9 +163,6 @@ const int HAVOCBOT_CTF_ROLE_ESCORT = 64;
 
 .bool havocbot_cantfindflag;
 
-vector havocbot_ctf_middlepoint;
-float havocbot_ctf_middlepoint_radius;
-
 void havocbot_role_ctf_setrole(entity bot, int role);
 
 // team checking