Xonotic
sv_invasion.qh
Go to the documentation of this file.
1 #pragma once
2 
4 #define autocvar_g_invasion_point_limit cvar("g_invasion_point_limit")
8 bool g_invasion;
12 void invasion_Initialize();
13 
14 REGISTER_MUTATOR(inv, false)
15 {
18  {
19  g_invasion_roundends = IL_NEW();
20  g_invasion_waves = IL_NEW();
21  g_invasion_spawns = IL_NEW();
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 }
34 
42 
45 
47 
48 const float ST_INV_KILLS = 1;
49 
50 const int INV_TYPE_ROUND = 0; // round-based waves of enemies
51 const int INV_TYPE_HUNT = 1; // clear the map of placed enemies
52 const int INV_TYPE_STAGE = 2; // reach the end of the level
float inv_roundcnt
Definition: sv_invasion.qh:37
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
limitations: NULL cannot be present elements can only be present once a maximum of IL_MAX lists can e...
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
int autocvar_g_invasion_type
Definition: sv_invasion.qh:6
float invasion_teams
Definition: sv_invasion.qh:43
void invasion_Initialize()
Definition: sv_invasion.qc:601
float inv_maxrounds
Definition: sv_invasion.qh:38
float inv_monsters_perteam[17]
Definition: sv_invasion.qh:44
float inv_maxspawned
Definition: sv_invasion.qh:36
const int INV_TYPE_ROUND
Definition: sv_invasion.qh:50
float inv_lastcheck
Definition: sv_invasion.qh:40
float inv_numkilled
Definition: sv_invasion.qh:39
REGISTER_MUTATOR(inv, false)
Definition: sv_invasion.qh:14
int autocvar_g_invasion_teams
Definition: sv_invasion.qh:5
#define MUTATOR_ONADD
Definition: base.qh:284
float inv_monsterskill
Definition: sv_invasion.qh:46
float inv_maxcurrent
Definition: sv_invasion.qh:41
const float ST_INV_KILLS
Definition: sv_invasion.qh:48
const int INV_TYPE_HUNT
Definition: sv_invasion.qh:51
const int INV_TYPE_STAGE
Definition: sv_invasion.qh:52
float inv_numspawned
Definition: sv_invasion.qh:35