Xonotic
sv_invasion.qh File Reference
+ Include dependency graph for sv_invasion.qh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define autocvar_g_invasion_point_limit   cvar("g_invasion_point_limit")
 

Functions

void invasion_Initialize ()
 
 REGISTER_MUTATOR (inv, false)
 

Variables

bool autocvar_g_invasion_team_spawns
 
int autocvar_g_invasion_teams
 
int autocvar_g_invasion_type
 
bool g_invasion
 
IntrusiveList g_invasion_roundends
 
IntrusiveList g_invasion_spawns
 
IntrusiveList g_invasion_waves
 
float inv_lastcheck
 
float inv_maxcurrent
 
float inv_maxrounds
 
float inv_maxspawned
 
float inv_monsters_perteam [17]
 
float inv_monsterskill
 
float inv_numkilled
 
float inv_numspawned
 
float inv_roundcnt
 
const int INV_TYPE_HUNT = 1
 
const int INV_TYPE_ROUND = 0
 
const int INV_TYPE_STAGE = 2
 
float invasion_teams
 
const float ST_INV_KILLS = 1
 

Macro Definition Documentation

◆ autocvar_g_invasion_point_limit

#define autocvar_g_invasion_point_limit   cvar("g_invasion_point_limit")

Definition at line 4 of file sv_invasion.qh.

Referenced by REGISTER_MUTATOR().

Function Documentation

◆ invasion_Initialize()

void invasion_Initialize ( )

Definition at line 601 of file sv_invasion.qc.

References InitializeEntity(), invasion_DelayedInit(), and NULL.

Referenced by REGISTER_MUTATOR().

602 {
603  InitializeEntity(NULL, invasion_DelayedInit, INITPRIO_GAMETYPE);
604 }
#define NULL
Definition: post.qh:17
void InitializeEntity(entity e, void(entity this) func, int order)
Definition: world.qc:2146
void invasion_DelayedInit(entity this)
Definition: sv_invasion.qc:573
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ REGISTER_MUTATOR()

REGISTER_MUTATOR ( inv  ,
false   
)

Definition at line 14 of file sv_invasion.qh.

References autocvar_g_invasion_point_limit, autocvar_g_invasion_team_spawns, autocvar_g_invasion_teams, cvar_settemp(), g_invasion, GameRules_limit_score(), GameRules_spawning_teams(), GameRules_teams(), IL_NEW, invasion_Initialize(), MUTATOR_ONADD, and MUTATOR_STATIC.

15 {
18  {
22  if (autocvar_g_invasion_teams >= 2) {
23  GameRules_teams(true);
25  }
27 
28  g_invasion = true;
29  cvar_settemp("g_monsters", "1");
31  }
32  return 0;
33 }
IntrusiveList g_invasion_waves
Definition: sv_invasion.qh:10
#define MUTATOR_STATIC()
Definition: base.qh:288
void GameRules_spawning_teams(bool value)
Used to disable team spawns in team modes.
Definition: sv_rules.qc:22
bool g_invasion
Definition: sv_invasion.qh:8
float cvar_settemp(string tmp_cvar, string tmp_value)
Definition: util.qc:696
#define IL_NEW()
void GameRules_limit_score(int limit)
Definition: sv_rules.qc:34
bool autocvar_g_invasion_team_spawns
Definition: sv_invasion.qh:7
IntrusiveList g_invasion_roundends
Definition: sv_invasion.qh:9
void GameRules_teams(bool value)
Definition: sv_rules.qc:6
#define autocvar_g_invasion_point_limit
Definition: sv_invasion.qh:4
IntrusiveList g_invasion_spawns
Definition: sv_invasion.qh:11
void invasion_Initialize()
Definition: sv_invasion.qc:601
int autocvar_g_invasion_teams
Definition: sv_invasion.qh:5
#define MUTATOR_ONADD
Definition: base.qh:284
+ Here is the call graph for this function:

Variable Documentation

◆ autocvar_g_invasion_team_spawns

bool autocvar_g_invasion_team_spawns

Definition at line 7 of file sv_invasion.qh.

Referenced by REGISTER_MUTATOR().

◆ autocvar_g_invasion_teams

int autocvar_g_invasion_teams

Definition at line 5 of file sv_invasion.qh.

Referenced by invasion_DelayedInit(), and REGISTER_MUTATOR().

◆ autocvar_g_invasion_type

int autocvar_g_invasion_type

◆ g_invasion

bool g_invasion

Definition at line 8 of file sv_invasion.qh.

Referenced by REGISTER_MUTATOR(), and spawnfunc().

◆ g_invasion_roundends

IntrusiveList g_invasion_roundends

Definition at line 9 of file sv_invasion.qh.

Referenced by spawnfunc(), and WinningCondition_Invasion().

◆ g_invasion_spawns

IntrusiveList g_invasion_spawns

Definition at line 11 of file sv_invasion.qh.

Referenced by invasion_PickSpawn(), and spawnfunc().

◆ g_invasion_waves

IntrusiveList g_invasion_waves

Definition at line 10 of file sv_invasion.qh.

Referenced by invasion_GetWaveEntity(), and spawnfunc().

◆ inv_lastcheck

float inv_lastcheck

Definition at line 40 of file sv_invasion.qh.

Referenced by Invasion_CheckWinner().

◆ inv_maxcurrent

float inv_maxcurrent

Definition at line 41 of file sv_invasion.qh.

Referenced by Invasion_CheckWinner(), Invasion_RoundStart(), and MUTATOR_HOOKFUNCTION().

◆ inv_maxrounds

float inv_maxrounds

◆ inv_maxspawned

float inv_maxspawned

Definition at line 36 of file sv_invasion.qh.

Referenced by Invasion_CheckWinner(), Invasion_RoundStart(), and MUTATOR_HOOKFUNCTION().

◆ inv_monsters_perteam

float inv_monsters_perteam[17]

◆ inv_monsterskill

float inv_monsterskill

Definition at line 46 of file sv_invasion.qh.

Referenced by Invasion_RoundStart(), and MUTATOR_HOOKFUNCTION().

◆ inv_numkilled

float inv_numkilled

Definition at line 39 of file sv_invasion.qh.

Referenced by Invasion_CheckWinner(), Invasion_RoundStart(), and MUTATOR_HOOKFUNCTION().

◆ inv_numspawned

float inv_numspawned

Definition at line 35 of file sv_invasion.qh.

Referenced by Invasion_CheckWinner(), Invasion_RoundStart(), and MUTATOR_HOOKFUNCTION().

◆ inv_roundcnt

float inv_roundcnt

◆ INV_TYPE_HUNT

const int INV_TYPE_HUNT = 1

◆ INV_TYPE_ROUND

const int INV_TYPE_ROUND = 0

Definition at line 50 of file sv_invasion.qh.

Referenced by invasion_DelayedInit(), and MUTATOR_HOOKFUNCTION().

◆ INV_TYPE_STAGE

const int INV_TYPE_STAGE = 2

Definition at line 52 of file sv_invasion.qh.

Referenced by invasion_DelayedInit(), and WinningCondition_Invasion().

◆ invasion_teams

◆ ST_INV_KILLS

const float ST_INV_KILLS = 1

Definition at line 48 of file sv_invasion.qh.

Referenced by invasion_ScoreRules(), and MUTATOR_HOOKFUNCTION().