Xonotic
sv_onslaught.qh
Go to the documentation of this file.
1 #pragma once
2 
4 
7 void ons_Initialize();
8 
9 REGISTER_MUTATOR(ons, false)
10 {
13  {
14  GameRules_teams(true);
16 
18  }
19  return false;
20 }
21 
22 .entity ons_toucher; // player who touched the control point
23 
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');
30 
31 // list of generators on the map
34 
35 // list of control points on the map
38 
39 // list of links on the map
42 
43 // definitions
44 .entity sprite;
45 .string target2;
47 .int islinked;
49 .float lasthealth;
50 .int lastteam;
53 
54 .bool waslinked;
55 
57 
59 
63 
65 
66 .vector ons_deathloc;
67 
68 .entity ons_spawn_by;
69 
70 // declarations for functions used outside gamemode_onslaught.qc
73 bool ons_ControlPoint_Attackable(entity cp, int teamnum);
74 
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
77 
78 // bot player logic
79 const int HAVOCBOT_ONS_ROLE_NONE = 0;
83 
85 
87 
91 
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);
95 
96 // score rule declarations
97 const int ST_ONS_CAPS = 1;
float autocvar_g_onslaught_point_limit
Definition: sv_onslaught.qh:5
int islinked
Definition: sv_onslaught.qh:47
float teleport_antispam
Definition: sv_onslaught.qh:58
void havocbot_goalrating_items(entity this, float ratingscale, vector org, float sradius)
Definition: roles.qc:106
#define MUTATOR_STATIC()
Definition: base.qh:288
void havocbot_role_ons_defense(entity this)
void havocbot_ons_reset_role(entity this)
const float GEN_THINKRATE
Definition: sv_onslaught.qh:26
entity ons_worldcplist
Definition: sv_onslaught.qh:36
entity havocbot_ons_target
Definition: sv_onslaught.qh:84
const int HAVOCBOT_ONS_ROLE_ASSISTANT
Definition: sv_onslaught.qh:81
entity() spawn
entity sprite
Definition: sv_onslaught.qh:44
int arecpsneighbor
Definition: sv_onslaught.qh:61
float havocbot_attack_time
Definition: sv_onslaught.qh:86
const int HAVOCBOT_ONS_ROLE_NONE
Definition: sv_onslaught.qh:79
void GameRules_limit_score(int limit)
Definition: sv_rules.qc:34
entity ons_toucher
Definition: sv_onslaught.qh:22
void ons_ControlPoint_UpdateSprite(entity e)
entity ons_worldcpnext
Definition: sv_onslaught.qh:37
const vector CPGEN_WAYPOINT_OFFSET
Definition: sv_onslaught.qh:28
limitations: NULL cannot be present elements can only be present once a maximum of IL_MAX lists can e...
const int ST_ONS_CAPS
Definition: sv_onslaught.qh:97
entity ons_worldlinklist
Definition: sv_onslaught.qh:40
void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org, float sradius)
Definition: roles.qc:176
int iscaptured
Definition: sv_onslaught.qh:46
float ons_overtime_damagedelay
Definition: sv_onslaught.qh:64
int lastteam
Definition: sv_onslaught.qh:50
bool ons_ControlPoint_Attackable(entity cp, int teamnum)
entity ons_worldgeneratornext
Definition: sv_onslaught.qh:33
float ons_notification_time[17]
Definition: sv_onslaught.qh:62
void ons_Generator_UpdateSprite(entity e)
void GameRules_teams(bool value)
Definition: sv_rules.qc:6
vector ons_deathloc
Definition: sv_onslaught.qh:66
void havocbot_role_ons_offense(entity this)
entity ons_worldgeneratorlist
Definition: sv_onslaught.qh:32
int lastcaptured
Definition: sv_onslaught.qh:52
bool waslinked
Definition: sv_onslaught.qh:54
const int HAVOCBOT_ONS_ROLE_OFFENSE
Definition: sv_onslaught.qh:82
entity ons_spawn_by
Definition: sv_onslaught.qh:68
const float ONS_CP_THINKRATE
Definition: sv_onslaught.qh:25
string target2
Definition: sv_onslaught.qh:45
vector(float skel, float bonenum) _skel_get_boneabs_hidden
IntrusiveList g_onsshields
Definition: sv_onslaught.qh:6
bool ons_stalemate
Definition: sv_onslaught.qh:56
float lasthealth
Definition: sv_onslaught.qh:49
void havocbot_role_ons_assistant(entity this)
const int HAVOCBOT_ONS_ROLE_DEFENSE
Definition: sv_onslaught.qh:80
float ons_captureshield_force
Definition: sv_onslaught.qh:76
entity ons_worldlinknext
Definition: sv_onslaught.qh:41
int aregensneighbor
Definition: sv_onslaught.qh:60
int isshielded
Definition: sv_onslaught.qh:48
#define MUTATOR_ONADD
Definition: base.qh:284
int lastshielded
Definition: sv_onslaught.qh:51
void ons_Initialize()
const vector CPICON_OFFSET
Definition: sv_onslaught.qh:29
REGISTER_MUTATOR(ons, false)
Definition: sv_onslaught.qh:9