3 float autocvar_g_onslaught_point_limit;
6 REGISTER_MUTATOR(ons, false)
10 if (time > 1) // game loads at time 1
11 error("This is a game type and it cannot be added at runtime.");
14 GameRules_teams(true);
15 GameRules_limit_score(autocvar_g_onslaught_point_limit);
16 have_team_spawns = -1; // request team spawns
19 MUTATOR_ONROLLBACK_OR_REMOVE
21 // we actually cannot roll back ons_Initialize here
22 // BUT: we don't need to! If this gets called, adding always
28 LOG_INFO("This is a game type and it cannot be removed at runtime.");
35 .entity ons_toucher; // player who touched the control point
37 // control point / generator constants
38 const float ONS_CP_THINKRATE = 0.2;
39 const float GEN_THINKRATE = 1;
40 #define CPGEN_SPAWN_OFFSET ('0 0 1' * (PL_MAX_CONST.z - 13))
41 const vector CPGEN_WAYPOINT_OFFSET = ('0 0 128');
42 const vector CPICON_OFFSET = ('0 0 96');
44 // list of generators on the map
45 entity ons_worldgeneratorlist;
46 .entity ons_worldgeneratornext;
48 // list of control points on the map
49 entity ons_worldcplist;
50 .entity ons_worldcpnext;
52 // list of links on the map
53 entity ons_worldlinklist;
54 .entity ons_worldlinknext;
71 .float teleport_antispam;
75 float ons_notification_time[17];
77 .float ons_overtime_damagedelay;
83 // declarations for functions used outside gamemode_onslaught.qc
84 void ons_Generator_UpdateSprite(entity e);
85 void ons_ControlPoint_UpdateSprite(entity e);
86 bool ons_ControlPoint_Attackable(entity cp, int teamnumber);
88 // CaptureShield: Prevent capturing or destroying control point/generator if it is not available yet
89 float ons_captureshield_force; // push force of the shield
92 const int HAVOCBOT_ONS_ROLE_NONE = 0;
93 const int HAVOCBOT_ONS_ROLE_DEFENSE = 2;
94 const int HAVOCBOT_ONS_ROLE_ASSISTANT = 4;
95 const int HAVOCBOT_ONS_ROLE_OFFENSE = 8;
97 .entity havocbot_ons_target;
99 .int havocbot_role_flags;
100 .float havocbot_attack_time;
102 void havocbot_role_ons_defense(entity this);
103 void havocbot_role_ons_offense(entity this);
104 void havocbot_role_ons_assistant(entity this);
106 void havocbot_ons_reset_role(entity this);
107 void havocbot_goalrating_items(entity this, float ratingscale, vector org, float sradius);
108 void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org, float sradius);
110 // score rule declarations
111 const int ST_ONS_CAPS = 1;