]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/gamemode_ctf.qh
Also clean up dropping code a little bit
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_ctf.qh
index ce39a04df1392871bb2faf7d1ae1333b12c0cc33..1de49fdb93f01b4dbaf3c751136b3546863e8e45 100644 (file)
@@ -4,7 +4,7 @@
 void ctf_RespawnFlag(entity flag)
 
 // used in portals.qc
-void ctf_Handle_Drop(entity player, float droptype);
+void ctf_Handle_Throw(entity player, entity reciever, float droptype);
 
 // used in g_damage.qc
 float ctf_ReadScore(string parameter); // SOON WON'T BE NEEDED. // FIXCTF
@@ -58,8 +58,15 @@ entity ctf_worldflaglist;
 #define FLAG_CARRY 3
 #define FLAG_PASSING 4
 
-#define DROPTYPE_NORMAL 1
-#define DROPTYPE_THROWN 2
+#define DROP_NORMAL 1
+#define DROP_THROW 2
+#define DROP_PASS 3
+
+#define PICKUP_BASE 1
+#define PICKUP_DROPPED 2
+
+#define CAPTURE_NORMAL 1
+#define CAPTURE_DROPPED 2
 
 // flag properties
 #define ctf_spawnorigin dropped_origin
@@ -67,12 +74,15 @@ float ctf_captimerecord; // record time for capturing the flag
 .float ctf_pickuptime;
 .float ctf_droptime;
 .float ctf_status; // status of the flag (FLAG_BASE, FLAG_DROPPED, FLAG_CARRY declared globally)
-.float max_flag_health;
-.entity ctf_pickupper;
+.entity ctf_carrier;
 .entity ctf_dropper; // don't allow spam of dropping the flag
+.float max_flag_health;
+.float next_take_time;
 
-// other properties
-.float pass_antispam;
+// passing properties
+.entity pass_sender;
+.entity pass_target;
+.float throw_antispam;
 
 // CaptureShield: If the player is too bad to be allowed to capture, shield them from taking the flag.
 .float ctf_captureshielded; // set to 1 if the player is too bad to be allowed to capture