]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/gamemode_ctf.qh
Remove more game mode dependent code from other files
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_ctf.qh
index 38f48b4e2bfef71c2abadf2c3f221ff472f6d5c9..5a7e9d88b6742556c1d47ad5adbbdabdd5d91903 100644 (file)
@@ -3,12 +3,6 @@
 // used in cheats.qc
 void ctf_RespawnFlag(entity flag)
 
-// used in portals.qc
-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
-
 // used in t_quake3.qc
 void spawnfunc_info_player_team1();
 void spawnfunc_info_player_team2();
@@ -27,20 +21,22 @@ void spawnfunc_ctf_team();
 #define FLAG_TOUCHRATE 0.5
 
 #define FLAG_DROP_OFFSET ('0 0 32')
-#define FLAG_CARRY_OFFSET ('-15 0 7')
+#define FLAG_CARRY_OFFSET ('-16 0 8')
 #define FLAG_SPAWN_OFFSET ('0 0 1' * (PL_MAX_z - 13))
 #define FLAG_WAYPOINT_OFFSET ('0 0 64')
 
-// sounds 
-.string noise4;
-.string noise5;
+// waypoint colors
+#define WPCOLOR_ENEMYFC(t) (colormapPaletteColor(t - 1, FALSE) * 0.75)
+#define WPCOLOR_FLAGCARRIER(t) (('0 0.75 0' + colormapPaletteColor(t - 1, FALSE)) * 0.5)
+#define WPCOLOR_DROPPEDFLAG(t) (('0.25 0.25 0.25' + colormapPaletteColor(t - 1, FALSE)) * 0.5)
 
+// sounds 
 #define snd_flag_taken noise
 #define snd_flag_returned noise1
 #define snd_flag_capture noise2
 #define snd_flag_respawn noise3
-#define snd_flag_dropped noise4
-#define snd_flag_touch noise5
+.string snd_flag_dropped;
+.string snd_flag_touch;
 
 // list of flags on the map
 entity ctf_worldflaglist;
@@ -51,6 +47,7 @@ entity ctf_worldflaglist;
 .entity wps_flagbase; 
 .entity wps_flagcarrier;
 .entity wps_flagdropped;
+.entity wps_enemyflagcarrier;
 
 // statuses
 #define FLAG_BASE 1
@@ -58,9 +55,16 @@ entity ctf_worldflaglist;
 #define FLAG_CARRY 3
 #define FLAG_PASSING 4
 
-#define DROPTYPE_DROP 1
-#define DROPTYPE_THROW 2
-#define DROPTYPE_PASS 3
+#define DROP_NORMAL 1
+#define DROP_THROW 2
+#define DROP_PASS 3
+#define DROP_RESET 4
+
+#define PICKUP_BASE 1
+#define PICKUP_DROPPED 2
+
+#define CAPTURE_NORMAL 1
+#define CAPTURE_DROPPED 2
 
 // flag properties
 #define ctf_spawnorigin dropped_origin
@@ -71,6 +75,8 @@ float ctf_captimerecord; // record time for capturing the flag
 .entity ctf_carrier;
 .entity ctf_dropper; // don't allow spam of dropping the flag
 .float max_flag_health;
+.float next_take_time;
+.float wpforenemy_announced;
 
 // passing properties
 .entity pass_sender;