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