3 #include <common/mutators/base.qh>
5 float autocvar_g_onslaught_point_limit;
8 REGISTER_MUTATOR(ons, false)
13 GameRules_teams(true);
14 GameRules_limit_score(autocvar_g_onslaught_point_limit);
21 .entity ons_toucher; // player who touched the control point
23 // control point / generator constants
24 const float ONS_CP_THINKRATE = 0.2;
25 const float GEN_THINKRATE = 1;
26 #define CPGEN_SPAWN_OFFSET ('0 0 1' * (PL_MAX_CONST.z - 13))
27 const vector CPGEN_WAYPOINT_OFFSET = ('0 0 128');
28 const vector CPICON_OFFSET = ('0 0 96');
30 // list of generators on the map
31 entity ons_worldgeneratorlist;
32 .entity ons_worldgeneratornext;
34 // list of control points on the map
35 entity ons_worldcplist;
36 .entity ons_worldcpnext;
38 // list of links on the map
39 entity ons_worldlinklist;
40 .entity ons_worldlinknext;
57 .float teleport_antispam;
61 float ons_notification_time[17];
63 .float ons_overtime_damagedelay;
69 // declarations for functions used outside gamemode_onslaught.qc
70 void ons_Generator_UpdateSprite(entity e);
71 void ons_ControlPoint_UpdateSprite(entity e);
72 bool ons_ControlPoint_Attackable(entity cp, int teamnum);
74 // CaptureShield: Prevent capturing or destroying control point/generator if it is not available yet
75 float ons_captureshield_force; // push force of the shield
78 const int HAVOCBOT_ONS_ROLE_NONE = 0;
79 const int HAVOCBOT_ONS_ROLE_DEFENSE = 2;
80 const int HAVOCBOT_ONS_ROLE_ASSISTANT = 4;
81 const int HAVOCBOT_ONS_ROLE_OFFENSE = 8;
83 .entity havocbot_ons_target;
85 .float havocbot_attack_time;
87 void havocbot_role_ons_defense(entity this);
88 void havocbot_role_ons_offense(entity this);
89 void havocbot_role_ons_assistant(entity this);
91 void havocbot_ons_reset_role(entity this);
92 void havocbot_goalrating_items(entity this, float ratingscale, vector org, float sradius);
93 void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org, float sradius);
95 // score rule declarations
96 const int ST_ONS_CAPS = 1;