Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
sv_assault.qh File Reference
Include dependency graph for sv_assault.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 REGISTER_MUTATOR (as, false)
void target_objective_decrease_activate (entity this)
 void (entity this) havocbot_role_ast_defense
 void (entity this, float ratingscale, vector org, float sradius) havocbot_goalrating_items

Variables

int assault_attacker_team
entity assault_decreaser
entity assault_sprite
const int ASSAULT_VALUE_INACTIVE = 1000
IntrusiveList g_assault_destructibles
IntrusiveList g_assault_objectivedecreasers
IntrusiveList g_assault_objectives
const int HAVOCBOT_AST_ROLE_DEFENSE = 2
const int HAVOCBOT_AST_ROLE_NONE = 0
const int HAVOCBOT_AST_ROLE_OFFENSE = 4
float havocbot_attack_time
const int ST_ASSAULT_OBJECTIVES = 1

Function Documentation

◆ REGISTER_MUTATOR()

REGISTER_MUTATOR ( as ,
false  )

Definition at line 14 of file sv_assault.qh.

15{
18 {
22 GameRules_teams(true);
23 int teams = BITS(2); // always red vs blue
25 {
26 field_team(ST_ASSAULT_OBJECTIVES, "objectives", SFL_SORT_PRIO_PRIMARY);
27 field(SP_ASSAULT_OBJECTIVES, "objectives", SFL_SORT_PRIO_PRIMARY);
28 });
29 }
30 return 0;
31}
#define MUTATOR_ONADD
Definition base.qh:309
#define MUTATOR_STATIC()
Definition base.qh:313
#define BITS(n)
Definition bits.qh:9
entity teams
Definition main.qh:58
const int SFL_SORT_PRIO_SECONDARY
Scoring priority (NOTE: PRIMARY is used for fraglimit) NOTE: SFL_SORT_PRIO_SECONDARY value must be lo...
Definition scores.qh:133
const int SFL_SORT_PRIO_PRIMARY
Definition scores.qh:134
#define IL_NEW()
IntrusiveList g_assault_destructibles
Definition sv_assault.qh:10
IntrusiveList g_assault_objectives
Definition sv_assault.qh:12
IntrusiveList g_assault_objectivedecreasers
Definition sv_assault.qh:11
const int ST_ASSAULT_OBJECTIVES
Definition sv_assault.qh:8
void GameRules_teams(bool value)
Definition sv_rules.qc:3
#define GameRules_scoring(teams, spprio, stprio, fields)
Definition sv_rules.qh:58

References BITS, g_assault_destructibles, g_assault_objectivedecreasers, g_assault_objectives, GameRules_scoring, GameRules_teams(), IL_NEW, MUTATOR_ONADD, MUTATOR_STATIC, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_SECONDARY, ST_ASSAULT_OBJECTIVES, and teams.

◆ target_objective_decrease_activate()

void target_objective_decrease_activate ( entity this)

Definition at line 106 of file sv_assault.qc.

107{
108 entity spr;
109 this.owner = NULL;
111 {
112 if(it.assault_sprite != NULL)
113 {
115 if(it.classname == "func_assault_destructible")
116 it.sprite = NULL; // TODO: just unsetting it?!
117 }
118
119 spr = WaypointSprite_SpawnFixed(WP_AssaultDefend, 0.5 * (it.absmin + it.absmax), it, assault_sprite, RADARICON_OBJECTIVE);
120 spr.assault_decreaser = this;
121 spr.waypointsprite_visible_for_player = assault_decreaser_sprite_visible;
123 if(it.classname == "func_assault_destructible")
124 {
125 WaypointSprite_UpdateSprites(spr, WP_AssaultDefend, WP_AssaultDestroy, WP_AssaultDestroy);
126 WaypointSprite_UpdateMaxHealth(spr, it.max_health);
127 WaypointSprite_UpdateHealth(spr, GetResource(it, RES_HEALTH));
128 it.sprite = spr;
129 }
130 else
131 WaypointSprite_UpdateSprites(spr, WP_AssaultDefend, WP_AssaultPush, WP_AssaultPush);
132 });
133}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
entity owner
Definition main.qh:87
#define FOREACH_ENTITY_STRING(fld, match, body)
Definition iter.qh:184
#define NULL
Definition post.qh:14
bool assault_decreaser_sprite_visible(entity this, entity player, entity view)
Definition sv_assault.qc:98
entity assault_sprite
Definition sv_assault.qh:35
int assault_attacker_team
Definition sv_assault.qh:53
string targetname
Definition triggers.qh:56
string target
Definition triggers.qh:55
void WaypointSprite_UpdateSprites(entity e, entity _m1, entity _m2, entity _m3)
void WaypointSprite_UpdateMaxHealth(entity e, float f)
void WaypointSprite_UpdateHealth(entity e, float f)
entity WaypointSprite_SpawnFixed(entity spr, vector ofs, entity own,.entity ownfield, entity icon)
void WaypointSprite_Disown(entity wp, float fadetime)
void WaypointSprite_UpdateRule(entity e, float t, float r)
float waypointsprite_deadlifetime
const int SPRITERULE_TEAMPLAY

References assault_attacker_team, assault_decreaser_sprite_visible(), assault_sprite, entity(), FOREACH_ENTITY_STRING, GetResource(), NULL, owner, SPRITERULE_TEAMPLAY, target, targetname, waypointsprite_deadlifetime, WaypointSprite_Disown(), WaypointSprite_SpawnFixed(), WaypointSprite_UpdateHealth(), WaypointSprite_UpdateMaxHealth(), WaypointSprite_UpdateRule(), and WaypointSprite_UpdateSprites().

◆ void() [1/2]

◆ void() [2/2]

void ( entity this,
float ratingscale,
vector org,
float sradius )

Variable Documentation

◆ assault_attacker_team

◆ assault_decreaser

entity assault_decreaser

Definition at line 34 of file sv_assault.qh.

Referenced by assault_decreaser_sprite_visible().

◆ assault_sprite

entity assault_sprite

Definition at line 35 of file sv_assault.qh.

Referenced by target_objective_decrease_activate().

◆ ASSAULT_VALUE_INACTIVE

◆ g_assault_destructibles

IntrusiveList g_assault_destructibles

Definition at line 10 of file sv_assault.qh.

Referenced by havocbot_goalrating_ast_targets(), REGISTER_MUTATOR(), and spawnfunc().

◆ g_assault_objectivedecreasers

IntrusiveList g_assault_objectivedecreasers

Definition at line 11 of file sv_assault.qh.

Referenced by assault_objective_use(), REGISTER_MUTATOR(), and spawnfunc().

◆ g_assault_objectives

IntrusiveList g_assault_objectives

Definition at line 12 of file sv_assault.qh.

Referenced by assault_setenemytoobjective(), REGISTER_MUTATOR(), and spawnfunc().

◆ HAVOCBOT_AST_ROLE_DEFENSE

const int HAVOCBOT_AST_ROLE_DEFENSE = 2

Definition at line 39 of file sv_assault.qh.

Referenced by havocbot_ast_reset_role(), and havocbot_role_ast_setrole().

◆ HAVOCBOT_AST_ROLE_NONE

const int HAVOCBOT_AST_ROLE_NONE = 0

Definition at line 38 of file sv_assault.qh.

◆ HAVOCBOT_AST_ROLE_OFFENSE

const int HAVOCBOT_AST_ROLE_OFFENSE = 4

Definition at line 40 of file sv_assault.qh.

Referenced by havocbot_ast_reset_role(), and havocbot_role_ast_setrole().

◆ havocbot_attack_time

◆ ST_ASSAULT_OBJECTIVES

const int ST_ASSAULT_OBJECTIVES = 1

Definition at line 8 of file sv_assault.qh.

Referenced by REGISTER_MUTATOR(), and WinningCondition_Assault().