]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/mutators/gamemode_onslaught.qh
Merge branch 'master' into Mario/ons_updates
[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 const float ONS_CP_THINKRATE = 0.2;
9 const float GEN_THINKRATE = 1;
10 #define CPGEN_SPAWN_OFFSET ('0 0 1' * (PL_MAX_z - 13))
11 const vector CPGEN_WAYPOINT_OFFSET = ('0 0 128');
12 const vector 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 .int iscaptured;
33 .int islinked;
34 .int isshielded;
35 .float lasthealth;
36 .int lastteam;
37 .int lastshielded;
38 .int lastcaptured;
39
40 .bool waslinked;
41
42 bool ons_stalemate;
43
44 .float teleport_antispam;
45
46 .bool ons_roundlost;
47
48 // waypoint sprites
49 .entity bot_basewaypoint; // generator waypointsprite
50
51 .bool isgenneighbor[17];
52 .bool iscpneighbor[17];
53 float ons_notification_time[17];
54
55 .float ons_overtime_damagedelay;
56
57 .vector ons_deathloc;
58
59 .entity ons_spawn_by;
60
61 // declarations for functions used outside gamemode_onslaught.qc
62 void ons_Generator_UpdateSprite(entity e);
63 void ons_ControlPoint_UpdateSprite(entity e);
64 bool ons_ControlPoint_Attackable(entity cp, int teamnumber);
65
66 // CaptureShield: Prevent capturing or destroying control point/generator if it is not available yet
67 float ons_captureshield_force; // push force of the shield
68
69 // bot player logic
70 const int HAVOCBOT_ONS_ROLE_NONE                = 0;
71 const int HAVOCBOT_ONS_ROLE_DEFENSE     = 2;
72 const int HAVOCBOT_ONS_ROLE_ASSISTANT   = 4;
73 const int HAVOCBOT_ONS_ROLE_OFFENSE     = 8;
74
75 .entity havocbot_ons_target;
76
77 .int havocbot_role_flags;
78 .float havocbot_attack_time;
79
80 void havocbot_role_ons_defense();
81 void havocbot_role_ons_offense();
82 void havocbot_role_ons_assistant();
83
84 void havocbot_ons_reset_role(entity bot);
85 void havocbot_goalrating_items(float ratingscale, vector org, float sradius);
86 void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradius);
87
88 // score rule declarations
89 const int ST_ONS_CAPS = 1;
90 const int SP_ONS_CAPS = 4;
91 const int SP_ONS_TAKES = 6;
92
93 #endif