]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/mutators/gamemode_onslaught.qh
cb4aeb4cf4ff02b2748fcaa83322322c1e7f80a3
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_onslaught.qh
1 // these are needed since mutators are compiled last
2
3 #ifdef SVQC
4
5 .entity ons_toucher; // player who touched the control point
6
7 // control point / generator constants
8 #define ONS_CP_THINKRATE 0.2
9 #define GEN_THINKRATE 1
10 #define CPGEN_SPAWN_OFFSET ('0 0 1' * (PL_MAX_z - 13))
11 #define CPGEN_WAYPOINT_OFFSET ('0 0 128')
12 #define CPICON_OFFSET ('0 0 96')
13
14 // list of generators on the map
15 entity ons_worldgeneratorlist;
16 .entity ons_worldgeneratornext;
17 .entity ons_stalegeneratornext;
18
19 // list of control points on the map
20 entity ons_worldcplist;
21 .entity ons_worldcpnext;
22 .entity ons_stalecpnext;
23
24 // list of links on the map
25 entity ons_worldlinklist;
26 .entity ons_worldlinknext;
27 .entity ons_stalelinknext;
28
29 // definitions
30 .entity sprite;
31 .string target2;
32 .float iscaptured;
33 .float islinked;
34 .float isshielded;
35 .float lasthealth;
36 .float lastteam;
37 .float lastshielded;
38 .float lastcaptured;
39
40 .float waslinked;
41
42 float ons_stalemate;
43
44 .float teleport_antispam;
45
46 .float ons_roundlost;
47
48 // waypoint sprites
49 .entity bot_basewaypoint; // generator waypointsprite
50 float wpforenemy_announced;
51
52 .float isgenneighbor[17];
53 .float iscpneighbor[17];
54 float ons_notification_time[17];
55
56 .float ons_overtime_damagedelay;
57
58 .vector ons_deathloc;
59
60 .entity ons_spawn_by;
61
62 // declarations for functions used outside gamemode_onslaught.qc
63 void ons_Generator_UpdateSprite(entity e);
64 void ons_ControlPoint_UpdateSprite(entity e);
65 float ons_ControlPoint_Attackable(entity cp, float teamnumber);
66
67 // CaptureShield: Prevent capturing or destroying control point/generator if it is not available yet
68 float ons_captureshield_force; // push force of the shield
69
70 // bot player logic
71 #define HAVOCBOT_ONS_ROLE_NONE          0
72 #define HAVOCBOT_ONS_ROLE_DEFENSE       2
73 #define HAVOCBOT_ONS_ROLE_ASSISTANT     4
74 #define HAVOCBOT_ONS_ROLE_OFFENSE       8
75
76 .entity havocbot_ons_target;
77
78 .float havocbot_role_flags;
79 .float havocbot_attack_time;
80
81 void havocbot_role_ons_defense();
82 void havocbot_role_ons_offense();
83 void havocbot_role_ons_assistant();
84
85 void havocbot_ons_reset_role(entity bot);
86 void havocbot_goalrating_items(float ratingscale, vector org, float sradius);
87 void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradius);
88
89 // score rule declarations
90 #define ST_ONS_CAPS 1
91 #define SP_ONS_CAPS 4
92 #define SP_ONS_TAKES 6
93
94 #endif