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