]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/mutators/gamemode_ctf.qh
Remove useless declaration
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_ctf.qh
1 // these are needed since mutators are compiled last
2
3 // used in cheats.qc
4 void ctf_RespawnFlag(entity flag)
5
6 // used in g_damage.qc
7 float ctf_ReadScore(string parameter); // SOON WON'T BE NEEDED. // FIXCTF
8
9 // used in t_quake3.qc
10 void spawnfunc_info_player_team1();
11 void spawnfunc_info_player_team2();
12 void spawnfunc_info_player_team3();
13 void spawnfunc_info_player_team4();
14 void spawnfunc_item_flag_team1();
15 void spawnfunc_item_flag_team2();
16 void spawnfunc_ctf_team();
17
18 // flag constants // for most of these, there is just one question to be asked: WHYYYYY?
19 #define FLAG_MIN (PL_MIN + '0 0 -13')
20 #define FLAG_MAX (PL_MAX + '0 0 -13')
21 #define FLAG_SCALE 0.6
22
23 #define FLAG_THINKRATE 0.2
24 #define FLAG_TOUCHRATE 0.5
25
26 #define FLAG_DROP_OFFSET ('0 0 32')
27 #define FLAG_CARRY_OFFSET ('-16 0 8')
28 #define FLAG_SPAWN_OFFSET ('0 0 1' * (PL_MAX_z - 13))
29 #define FLAG_WAYPOINT_OFFSET ('0 0 64')
30
31 // waypoint colors
32 #define WPCOLOR_ENEMYFC(t) (colormapPaletteColor(t - 1, FALSE) * 0.75)
33 #define WPCOLOR_FLAGCARRIER(t) (('0 0.75 0' + colormapPaletteColor(t - 1, FALSE)) * 0.5)
34 #define WPCOLOR_DROPPEDFLAG(t) (('0.25 0.25 0.25' + colormapPaletteColor(t - 1, FALSE)) * 0.5)
35
36 // sounds 
37 #define snd_flag_taken noise
38 #define snd_flag_returned noise1
39 #define snd_flag_capture noise2
40 #define snd_flag_respawn noise3
41 .string snd_flag_dropped;
42 .string snd_flag_touch;
43
44 // list of flags on the map
45 entity ctf_worldflaglist;
46 .entity ctf_worldflagnext;
47
48 // waypoint sprites
49 .entity bot_basewaypoint; // flag waypointsprite
50 .entity wps_flagbase; 
51 .entity wps_flagcarrier;
52 .entity wps_flagdropped;
53 .entity wps_enemyflagcarrier;
54
55 // statuses
56 #define FLAG_BASE 1
57 #define FLAG_DROPPED 2
58 #define FLAG_CARRY 3
59 #define FLAG_PASSING 4
60
61 #define DROP_NORMAL 1
62 #define DROP_THROW 2
63 #define DROP_PASS 3
64 #define DROP_RESET 4
65
66 #define PICKUP_BASE 1
67 #define PICKUP_DROPPED 2
68
69 #define CAPTURE_NORMAL 1
70 #define CAPTURE_DROPPED 2
71
72 // flag properties
73 #define ctf_spawnorigin dropped_origin
74 float ctf_captimerecord; // record time for capturing the flag
75 .float ctf_pickuptime;
76 .float ctf_droptime;
77 .float ctf_status; // status of the flag (FLAG_BASE, FLAG_DROPPED, FLAG_CARRY declared globally)
78 .entity ctf_carrier;
79 .entity ctf_dropper; // don't allow spam of dropping the flag
80 .float max_flag_health;
81 .float next_take_time;
82 .float wpforenemy_announced;
83
84 // passing properties
85 .entity pass_sender;
86 .entity pass_target;
87 .float throw_antispam;
88
89 // CaptureShield: If the player is too bad to be allowed to capture, shield them from taking the flag.
90 .float ctf_captureshielded; // set to 1 if the player is too bad to be allowed to capture
91 float ctf_captureshield_min_negscore; // punish at -20 points
92 float ctf_captureshield_max_ratio; // punish at most 30% of each team
93 float ctf_captureshield_force; // push force of the shield