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