Xonotic
sv_nix.qc File Reference
#include "sv_nix.qh"
#include <server/weapons/selection.qh>
#include <server/world.qh>
+ Include dependency graph for sv_nix.qc:

Go to the source code of this file.

Functions

 MUTATOR_HOOKFUNCTION (nix, ForbidThrowCurrentWeapon)
 
 MUTATOR_HOOKFUNCTION (nix, BuildMutatorsString)
 
 MUTATOR_HOOKFUNCTION (nix, BuildMutatorsPrettyString)
 
 MUTATOR_HOOKFUNCTION (nix, FilterItemDefinition)
 
 MUTATOR_HOOKFUNCTION (nix, OnEntityPreSpawn)
 
 MUTATOR_HOOKFUNCTION (nix, PlayerPreThink)
 
 MUTATOR_HOOKFUNCTION (nix, ForbidRandomStartWeapons)
 
 MUTATOR_HOOKFUNCTION (nix, PlayerSpawn)
 
 MUTATOR_HOOKFUNCTION (nix, SetModname, CBC_ORDER_LAST)
 
bool NIX_CanChooseWeapon (int wpn)
 
void NIX_ChooseNextWeapon ()
 
void NIX_GiveCurrentWeapon (entity this)
 
 REGISTER_MUTATOR (nix, expr_evaluate(cvar_string("g_nix")) &&!MUTATOR_IS_ENABLED(mutator_instagib) &&!MUTATOR_IS_ENABLED(ok) &&!MapInfo_LoadedGametype.m_weaponarena)
 

Variables

int autocvar_g_balance_nix_ammo_cells
 
int autocvar_g_balance_nix_ammo_fuel
 
int autocvar_g_balance_nix_ammo_nails
 
int autocvar_g_balance_nix_ammo_plasma
 
int autocvar_g_balance_nix_ammo_rockets
 
int autocvar_g_balance_nix_ammo_shells
 
int autocvar_g_balance_nix_ammoincr_cells
 
int autocvar_g_balance_nix_ammoincr_fuel
 
int autocvar_g_balance_nix_ammoincr_nails
 
int autocvar_g_balance_nix_ammoincr_plasma
 
int autocvar_g_balance_nix_ammoincr_rockets
 
int autocvar_g_balance_nix_ammoincr_shells
 
float autocvar_g_balance_nix_incrtime
 
float autocvar_g_balance_nix_roundtime
 
bool autocvar_g_nix_with_blaster
 
bool autocvar_g_nix_with_healtharmor
 
bool autocvar_g_nix_with_powerups
 
int autocvar_g_pickup_cells_max
 
int autocvar_g_pickup_fuel_max
 
int autocvar_g_pickup_nails_max
 
int autocvar_g_pickup_plasma_max
 
int autocvar_g_pickup_rockets_max
 
int autocvar_g_pickup_shells_max
 
float g_nix_with_blaster
 
float nix_lastchange_id
 
float nix_lastinfotime
 
float nix_nextchange
 
float nix_nextincr
 
float nix_nextweapon
 
int nix_weapon
 

Function Documentation

◆ MUTATOR_HOOKFUNCTION() [1/9]

MUTATOR_HOOKFUNCTION ( nix  ,
ForbidThrowCurrentWeapon   
)

Definition at line 235 of file sv_nix.qc.

236 {
237  return true; // no throwing in NIX
238 }

◆ MUTATOR_HOOKFUNCTION() [2/9]

MUTATOR_HOOKFUNCTION ( nix  ,
BuildMutatorsString   
)

Definition at line 240 of file sv_nix.qc.

References M_ARGV, and strcat().

241 {
242  M_ARGV(0, string) = strcat(M_ARGV(0, string), ":NIX");
243 }
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
#define M_ARGV(x, type)
Definition: events.qh:17
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [3/9]

MUTATOR_HOOKFUNCTION ( nix  ,
BuildMutatorsPrettyString   
)

Definition at line 245 of file sv_nix.qc.

References M_ARGV, and strcat().

246 {
247  M_ARGV(0, string) = strcat(M_ARGV(0, string), ", NIX");
248 }
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
#define M_ARGV(x, type)
Definition: events.qh:17
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [4/9]

MUTATOR_HOOKFUNCTION ( nix  ,
FilterItemDefinition   
)

Definition at line 250 of file sv_nix.qc.

References autocvar_g_nix_with_healtharmor, autocvar_g_nix_with_powerups, entity(), and M_ARGV.

251 {
252  entity definition = M_ARGV(0, entity);
253 
254  if (definition.instanceOfHealth || definition.instanceOfArmor)
255  {
257  }
258  else if (definition.instanceOfPowerup)
259  {
261  }
262 
263  return true; // delete all other items
264 }
entity() spawn
bool autocvar_g_nix_with_healtharmor
Definition: sv_nix.qc:21
#define M_ARGV(x, type)
Definition: events.qh:17
bool autocvar_g_nix_with_powerups
Definition: sv_nix.qc:23
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [5/9]

MUTATOR_HOOKFUNCTION ( nix  ,
OnEntityPreSpawn   
)

Definition at line 266 of file sv_nix.qc.

References entity(), and M_ARGV.

267 {
268  entity ent = M_ARGV(0, entity);
269 
270  if(ent.classname == "target_items") // items triggers cannot work in nix (as they change weapons/ammo)
271  return true;
272 }
entity() spawn
#define M_ARGV(x, type)
Definition: events.qh:17
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [6/9]

MUTATOR_HOOKFUNCTION ( nix  ,
PlayerPreThink   
)

Definition at line 274 of file sv_nix.qc.

References entity(), IS_DEAD, IS_PLAYER, M_ARGV, and NIX_GiveCurrentWeapon().

275 {
276  entity player = M_ARGV(0, entity);
277 
278  if(!game_stopped)
279  if(!IS_DEAD(player))
280  if(IS_PLAYER(player))
281  NIX_GiveCurrentWeapon(player);
282 }
entity() spawn
void NIX_GiveCurrentWeapon(entity this)
Definition: sv_nix.qc:114
#define M_ARGV(x, type)
Definition: events.qh:17
#define IS_DEAD(s)
Definition: utils.qh:26
#define IS_PLAYER(v)
Definition: utils.qh:9
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [7/9]

MUTATOR_HOOKFUNCTION ( nix  ,
ForbidRandomStartWeapons   
)

Definition at line 284 of file sv_nix.qc.

285 {
286  return true;
287 }

◆ MUTATOR_HOOKFUNCTION() [8/9]

MUTATOR_HOOKFUNCTION ( nix  ,
PlayerSpawn   
)

Definition at line 289 of file sv_nix.qc.

References entity(), M_ARGV, and NIX_GiveCurrentWeapon().

290 {
291  entity player = M_ARGV(0, entity);
292 
293  player.nix_lastchange_id = -1;
294  NIX_GiveCurrentWeapon(player); // overrides the weapons you got when spawning
295  player.items |= IT_UNLIMITED_SUPERWEAPONS;
296 }
entity() spawn
void NIX_GiveCurrentWeapon(entity this)
Definition: sv_nix.qc:114
#define M_ARGV(x, type)
Definition: events.qh:17
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [9/9]

MUTATOR_HOOKFUNCTION ( nix  ,
SetModname  ,
CBC_ORDER_LAST   
)

Definition at line 298 of file sv_nix.qc.

References M_ARGV.

299 {
300  M_ARGV(0, string) = "NIX";
301 }
#define M_ARGV(x, type)
Definition: events.qh:17

◆ NIX_CanChooseWeapon()

bool NIX_CanChooseWeapon ( int  wpn)

Definition at line 84 of file sv_nix.qc.

References entity(), g_nix_with_blaster, g_weaponarena, g_weaponarena_weapons, REGISTRY_GET, WEP_FLAG_MUTATORBLOCKED, and WEP_FLAG_NORMAL.

Referenced by NIX_ChooseNextWeapon(), and REGISTER_MUTATOR().

85 {
86  entity e = REGISTRY_GET(Weapons, wpn);
87  if (e == WEP_Null) return false; // skip dummies
88  if(g_weaponarena)
89  {
90  if(!(g_weaponarena_weapons & e.m_wepset))
91  return false;
92  }
93  else
94  {
95  if(wpn == WEP_BLASTER.m_id && g_nix_with_blaster)
96  return false;
97  if(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)
98  return false;
99  if (!(e.spawnflags & WEP_FLAG_NORMAL))
100  return false;
101  }
102  return true;
103 }
entity() spawn
#define REGISTRY_GET(id, i)
Definition: registry.qh:43
float g_nix_with_blaster
Definition: sv_nix.qc:31
const int WEP_FLAG_NORMAL
Definition: weapon.qh:199
const int WEP_FLAG_MUTATORBLOCKED
Definition: weapon.qh:203
WepSet g_weaponarena_weapons
Definition: world.qh:77
float g_weaponarena
Definition: world.qh:76
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NIX_ChooseNextWeapon()

void NIX_ChooseNextWeapon ( )

Definition at line 104 of file sv_nix.qc.

References FOREACH, NIX_CanChooseWeapon(), nix_nextweapon, nix_weapon, RandomSelection_AddFloat, RandomSelection_chosen_float, and RandomSelection_Init().

Referenced by NIX_GiveCurrentWeapon().

105 {
107  FOREACH(Weapons, it != WEP_Null, {
108  if(NIX_CanChooseWeapon(it.m_id))
109  RandomSelection_AddFloat(it.m_id, 1, (it.m_id != nix_weapon));
110  });
112 }
ERASEABLE void RandomSelection_Init()
Definition: random.qc:4
int nix_weapon
Definition: sv_nix.qc:33
float RandomSelection_chosen_float
Definition: random.qh:6
bool NIX_CanChooseWeapon(int wpn)
Definition: sv_nix.qc:84
float nix_nextweapon
Definition: sv_nix.qc:35
#define RandomSelection_AddFloat(f, weight, priority)
Definition: random.qh:15
#define FOREACH(list, cond, body)
Definition: iter.qh:19
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NIX_GiveCurrentWeapon()

void NIX_GiveCurrentWeapon ( entity  this)

Definition at line 114 of file sv_nix.qc.

References autocvar_g_balance_nix_ammo_cells, autocvar_g_balance_nix_ammo_fuel, autocvar_g_balance_nix_ammo_nails, autocvar_g_balance_nix_ammo_plasma, autocvar_g_balance_nix_ammo_rockets, autocvar_g_balance_nix_ammo_shells, autocvar_g_balance_nix_ammoincr_cells, autocvar_g_balance_nix_ammoincr_fuel, autocvar_g_balance_nix_ammoincr_nails, autocvar_g_balance_nix_ammoincr_plasma, autocvar_g_balance_nix_ammoincr_rockets, autocvar_g_balance_nix_ammoincr_shells, autocvar_g_balance_nix_incrtime, autocvar_g_balance_nix_roundtime, autocvar_g_pickup_cells_max, autocvar_g_pickup_fuel_max, autocvar_g_pickup_nails_max, autocvar_g_pickup_plasma_max, autocvar_g_pickup_rockets_max, autocvar_g_pickup_shells_max, ceil(), client_hasweapon(), entity(), g_nix_with_blaster, GiveResource(), items, MAX_WEAPONSLOTS, NIX_ChooseNextWeapon(), nix_lastchange_id, nix_lastinfotime, nix_nextchange, nix_nextincr, nix_nextweapon, nix_weapon, REGISTRY_GET, SetResource(), time, W_SwitchWeapon(), weapon_load, weaponentities, WEP_FLAG_RELOADABLE, and WEPSET.

Referenced by MUTATOR_HOOKFUNCTION().

115 {
116  float dt;
117 
118  if(!nix_nextweapon)
120 
121  dt = ceil(nix_nextchange - time);
122 
123  if(dt <= 0)
124  {
126  nix_nextweapon = 0;
127  if (!nix_nextchange) // no round played yet?
128  nix_nextchange = time; // start the first round now!
129  else
131  // Weapon w = REGISTRY_GET(Weapons, nix_weapon);
132  // w.wr_init(w); // forget it, too slow
133  }
134 
135  // get weapon info
136  entity wpn = REGISTRY_GET(Weapons, nix_weapon);
137 
138  // TODO: registry handles
139  if(nix_nextchange != this.nix_lastchange_id) // this shall only be called once per round!
140  {
141  SetResource(this, RES_SHELLS, 0);
142  SetResource(this, RES_BULLETS, 0);
143  SetResource(this, RES_ROCKETS, 0);
144  SetResource(this, RES_CELLS, 0);
145  SetResource(this, RES_PLASMA, 0);
146  SetResource(this, RES_FUEL, 0);
147  if(this.items & IT_UNLIMITED_AMMO)
148  {
149  switch (wpn.ammo_type)
150  {
151  case RES_SHELLS: SetResource(this, RES_SHELLS, autocvar_g_pickup_shells_max); break;
152  case RES_BULLETS: SetResource(this, RES_BULLETS, autocvar_g_pickup_nails_max); break;
153  case RES_ROCKETS: SetResource(this, RES_ROCKETS, autocvar_g_pickup_rockets_max); break;
154  case RES_CELLS: SetResource(this, RES_CELLS, autocvar_g_pickup_cells_max); break;
155  case RES_PLASMA: SetResource(this, RES_PLASMA, autocvar_g_pickup_plasma_max); break;
156  case RES_FUEL: SetResource(this, RES_FUEL, autocvar_g_pickup_fuel_max); break;
157  }
158  }
159  else
160  {
161  switch (wpn.ammo_type)
162  {
163  case RES_SHELLS: SetResource(this, RES_SHELLS, autocvar_g_balance_nix_ammo_shells); break;
164  case RES_BULLETS: SetResource(this, RES_BULLETS, autocvar_g_balance_nix_ammo_nails); break;
165  case RES_ROCKETS: SetResource(this, RES_ROCKETS, autocvar_g_balance_nix_ammo_rockets); break;
166  case RES_CELLS: SetResource(this, RES_CELLS, autocvar_g_balance_nix_ammo_cells); break;
167  case RES_PLASMA: SetResource(this, RES_PLASMA, autocvar_g_balance_nix_ammo_plasma); break;
168  case RES_FUEL: SetResource(this, RES_FUEL, autocvar_g_balance_nix_ammo_fuel); break;
169  }
170  }
171 
173  if(dt >= 1 && dt <= 5)
174  this.nix_lastinfotime = -42;
175  else
176  Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_NIX_NEWWEAPON, nix_weapon);
177 
178  wpn.wr_resetplayer(wpn, this);
179 
180  // all weapons must be fully loaded when we spawn
181  if (wpn.spawnflags & WEP_FLAG_RELOADABLE) // prevent accessing undefined cvars
182  {
183  for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
184  {
185  .entity weaponentity = weaponentities[slot];
186  this.(weaponentity).(weapon_load[nix_weapon]) = wpn.reloading_ammo;
187  }
188  }
189 
190  // set last change info
192  }
193  if(this.nix_lastinfotime != dt)
194  {
195  this.nix_lastinfotime = dt; // initial value 0 should count as "not seen"
196  if(dt >= 1 && dt <= 5)
197  Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_NIX_COUNTDOWN, nix_nextweapon, dt);
198  }
199 
200  if(!(this.items & IT_UNLIMITED_AMMO) && time > this.nix_nextincr)
201  {
202  switch (wpn.ammo_type)
203  {
204  case RES_SHELLS: GiveResource(this, RES_SHELLS, autocvar_g_balance_nix_ammoincr_shells); break;
205  case RES_BULLETS: GiveResource(this, RES_BULLETS, autocvar_g_balance_nix_ammoincr_nails); break;
206  case RES_ROCKETS: GiveResource(this, RES_ROCKETS, autocvar_g_balance_nix_ammoincr_rockets); break;
207  case RES_CELLS: GiveResource(this, RES_CELLS, autocvar_g_balance_nix_ammoincr_cells); break;
208  case RES_PLASMA: GiveResource(this, RES_PLASMA, autocvar_g_balance_nix_ammoincr_plasma); break;
209  case RES_FUEL: GiveResource(this, RES_FUEL, autocvar_g_balance_nix_ammoincr_fuel); break;
210  }
211 
213  }
214 
215  STAT(WEAPONS, this) = '0 0 0';
217  STAT(WEAPONS, this) |= WEPSET(BLASTER);
218  STAT(WEAPONS, this) |= wpn.m_wepset;
219 
220  for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
221  {
222  .entity weaponentity = weaponentities[slot];
223  if (this.(weaponentity).m_weapon == WEP_Null && slot != 0)
224  continue;
225 
226  if (this.(weaponentity).m_switchweapon != wpn)
227  if (!client_hasweapon(this, this.(weaponentity).m_switchweapon, weaponentity, true, false))
228  {
229  if (client_hasweapon(this, wpn, weaponentity, true, false))
230  W_SwitchWeapon(this, wpn, weaponentity);
231  }
232  }
233 }
int autocvar_g_balance_nix_ammoincr_rockets
Definition: sv_nix.qc:17
#define WEPSET(id)
Definition: all.qh:37
float weapon_load[REGISTRY_MAX(Weapons)]
Definition: weaponsystem.qh:29
int autocvar_g_balance_nix_ammoincr_cells
Definition: sv_nix.qc:13
const int WEP_FLAG_RELOADABLE
Definition: weapon.qh:201
int autocvar_g_balance_nix_ammo_shells
Definition: sv_nix.qc:12
int autocvar_g_balance_nix_ammo_plasma
Definition: sv_nix.qc:8
entity() spawn
int autocvar_g_pickup_fuel_max
Definition: sv_nix.qc:26
#define REGISTRY_GET(id, i)
Definition: registry.qh:43
float nix_lastchange_id
Definition: sv_nix.qc:36
int autocvar_g_balance_nix_ammoincr_plasma
Definition: sv_nix.qc:14
int nix_weapon
Definition: sv_nix.qc:33
float autocvar_g_balance_nix_roundtime
Definition: sv_nix.qc:20
float autocvar_g_balance_nix_incrtime
Definition: sv_nix.qc:19
int autocvar_g_pickup_rockets_max
Definition: sv_nix.qc:28
int autocvar_g_pickup_shells_max
Definition: sv_nix.qc:29
float g_nix_with_blaster
Definition: sv_nix.qc:31
float nix_nextchange
Definition: sv_nix.qc:34
int autocvar_g_balance_nix_ammoincr_shells
Definition: sv_nix.qc:18
int autocvar_g_balance_nix_ammo_cells
Definition: sv_nix.qc:7
void SetResource(entity e, Resource res_type, float amount)
Sets the current amount of resource the given entity will have.
Definition: cl_resources.qc:26
float nix_nextweapon
Definition: sv_nix.qc:35
const int MAX_WEAPONSLOTS
Definition: weapon.qh:13
float nix_nextincr
Definition: sv_nix.qc:38
int autocvar_g_balance_nix_ammoincr_nails
Definition: sv_nix.qc:16
int autocvar_g_balance_nix_ammo_rockets
Definition: sv_nix.qc:11
int autocvar_g_pickup_nails_max
Definition: sv_nix.qc:27
int autocvar_g_balance_nix_ammo_nails
Definition: sv_nix.qc:10
void GiveResource(entity receiver, Resource res_type, float amount)
Gives an entity some resource.
int autocvar_g_balance_nix_ammoincr_fuel
Definition: sv_nix.qc:15
float items
Definition: progsdefs.qc:145
int autocvar_g_pickup_cells_max
Definition: sv_nix.qc:24
void NIX_ChooseNextWeapon()
Definition: sv_nix.qc:104
bool W_SwitchWeapon(entity this, Weapon w,.entity weaponentity)
Definition: selection.qc:272
entity weaponentities[MAX_WEAPONSLOTS]
Definition: weapon.qh:14
int autocvar_g_pickup_plasma_max
Definition: sv_nix.qc:25
bool client_hasweapon(entity this, Weapon wpn,.entity weaponentity, float andammo, bool complain)
Definition: selection.qc:48
float time
Definition: csprogsdefs.qc:16
int autocvar_g_balance_nix_ammo_fuel
Definition: sv_nix.qc:9
float nix_lastinfotime
Definition: sv_nix.qc:37
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ REGISTER_MUTATOR()

REGISTER_MUTATOR ( nix  ,
expr_evaluate(cvar_string("g_nix")) &&!MUTATOR_IS_ENABLED(mutator_instagib) &&!MUTATOR_IS_ENABLED(ok) &&!MapInfo_LoadedGametype.  m_weaponarena 
)

Definition at line 42 of file sv_nix.qc.

References autocvar_g_nix_with_blaster, client_hasweapon(), FOREACH, FOREACH_CLIENT, g_nix_with_blaster, IS_DEAD, IS_PLAYER, MAX_WEAPONSLOTS, MUTATOR_ONADD, MUTATOR_ONREMOVE, MUTATOR_ONROLLBACK_OR_REMOVE, NIX_CanChooseWeapon(), nix_nextchange, nix_nextweapon, SetResource(), start_ammo_cells, start_ammo_fuel, start_ammo_nails, start_ammo_plasma, start_ammo_rockets, start_ammo_shells, start_weapons, w_getbestweapon, and weaponentities.

43 {
45  {
47 
48  nix_nextchange = 0;
49  nix_nextweapon = 0;
50 
51  FOREACH(Weapons, it != WEP_Null && NIX_CanChooseWeapon(it.m_id), { it.wr_init(it); });
52  }
53 
55  {
56  // nothing to roll back
57  }
58 
60  {
61  // as the PlayerSpawn hook will no longer run, NIX is turned off by this!
62  FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it), {
63  SetResource(it, RES_SHELLS, start_ammo_shells);
64  SetResource(it, RES_BULLETS, start_ammo_nails);
65  SetResource(it, RES_ROCKETS, start_ammo_rockets);
66  SetResource(it, RES_CELLS, start_ammo_cells);
67  SetResource(it, RES_PLASMA, start_ammo_plasma);
68  SetResource(it, RES_FUEL, start_ammo_fuel);
69  STAT(WEAPONS, it) = start_weapons;
70  for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
71  {
72  .entity weaponentity = weaponentities[slot];
73  if(it.(weaponentity).m_weapon == WEP_Null && slot != 0)
74  continue;
75  if(!client_hasweapon(it, it.(weaponentity).m_weapon, weaponentity, true, false))
76  it.(weaponentity).m_switchweapon = w_getbestweapon(it, weaponentity);
77  }
78  });
79  }
80 
81  return false;
82 }
float start_ammo_rockets
Definition: world.qh:87
float start_ammo_fuel
Definition: world.qh:90
WepSet start_weapons
Definition: world.qh:81
#define w_getbestweapon(ent, wepent)
Definition: selection.qh:23
#define FOREACH_CLIENT(cond, body)
Definition: utils.qh:49
float start_ammo_shells
Definition: world.qh:85
bool NIX_CanChooseWeapon(int wpn)
Definition: sv_nix.qc:84
float g_nix_with_blaster
Definition: sv_nix.qc:31
float nix_nextchange
Definition: sv_nix.qc:34
#define MUTATOR_ONROLLBACK_OR_REMOVE
Definition: base.qh:286
void SetResource(entity e, Resource res_type, float amount)
Sets the current amount of resource the given entity will have.
Definition: cl_resources.qc:26
float nix_nextweapon
Definition: sv_nix.qc:35
const int MAX_WEAPONSLOTS
Definition: weapon.qh:13
float start_ammo_cells
Definition: world.qh:88
#define IS_DEAD(s)
Definition: utils.qh:26
#define MUTATOR_ONREMOVE
Definition: base.qh:285
bool autocvar_g_nix_with_blaster
Definition: sv_nix.qc:22
float start_ammo_nails
Definition: world.qh:86
entity weaponentities[MAX_WEAPONSLOTS]
Definition: weapon.qh:14
#define MUTATOR_ONADD
Definition: base.qh:284
bool client_hasweapon(entity this, Weapon wpn,.entity weaponentity, float andammo, bool complain)
Definition: selection.qc:48
float start_ammo_plasma
Definition: world.qh:89
#define FOREACH(list, cond, body)
Definition: iter.qh:19
#define IS_PLAYER(v)
Definition: utils.qh:9
+ Here is the call graph for this function:

Variable Documentation

◆ autocvar_g_balance_nix_ammo_cells

int autocvar_g_balance_nix_ammo_cells

Definition at line 7 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_balance_nix_ammo_fuel

int autocvar_g_balance_nix_ammo_fuel

Definition at line 9 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_balance_nix_ammo_nails

int autocvar_g_balance_nix_ammo_nails

Definition at line 10 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_balance_nix_ammo_plasma

int autocvar_g_balance_nix_ammo_plasma

Definition at line 8 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_balance_nix_ammo_rockets

int autocvar_g_balance_nix_ammo_rockets

Definition at line 11 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_balance_nix_ammo_shells

int autocvar_g_balance_nix_ammo_shells

Definition at line 12 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_balance_nix_ammoincr_cells

int autocvar_g_balance_nix_ammoincr_cells

Definition at line 13 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_balance_nix_ammoincr_fuel

int autocvar_g_balance_nix_ammoincr_fuel

Definition at line 15 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_balance_nix_ammoincr_nails

int autocvar_g_balance_nix_ammoincr_nails

Definition at line 16 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_balance_nix_ammoincr_plasma

int autocvar_g_balance_nix_ammoincr_plasma

Definition at line 14 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_balance_nix_ammoincr_rockets

int autocvar_g_balance_nix_ammoincr_rockets

Definition at line 17 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_balance_nix_ammoincr_shells

int autocvar_g_balance_nix_ammoincr_shells

Definition at line 18 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_balance_nix_incrtime

float autocvar_g_balance_nix_incrtime

Definition at line 19 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_balance_nix_roundtime

float autocvar_g_balance_nix_roundtime

Definition at line 20 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_nix_with_blaster

bool autocvar_g_nix_with_blaster

Definition at line 22 of file sv_nix.qc.

Referenced by REGISTER_MUTATOR().

◆ autocvar_g_nix_with_healtharmor

bool autocvar_g_nix_with_healtharmor

Definition at line 21 of file sv_nix.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_nix_with_powerups

bool autocvar_g_nix_with_powerups

Definition at line 23 of file sv_nix.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_pickup_cells_max

int autocvar_g_pickup_cells_max

Definition at line 24 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_pickup_fuel_max

int autocvar_g_pickup_fuel_max

Definition at line 26 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_pickup_nails_max

int autocvar_g_pickup_nails_max

Definition at line 27 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_pickup_plasma_max

int autocvar_g_pickup_plasma_max

Definition at line 25 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_pickup_rockets_max

int autocvar_g_pickup_rockets_max

Definition at line 28 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ autocvar_g_pickup_shells_max

int autocvar_g_pickup_shells_max

Definition at line 29 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ g_nix_with_blaster

float g_nix_with_blaster

Definition at line 31 of file sv_nix.qc.

Referenced by NIX_CanChooseWeapon(), NIX_GiveCurrentWeapon(), and REGISTER_MUTATOR().

◆ nix_lastchange_id

float nix_lastchange_id

Definition at line 36 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ nix_lastinfotime

float nix_lastinfotime

Definition at line 37 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ nix_nextchange

float nix_nextchange

Definition at line 34 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon(), and REGISTER_MUTATOR().

◆ nix_nextincr

float nix_nextincr

Definition at line 38 of file sv_nix.qc.

Referenced by NIX_GiveCurrentWeapon().

◆ nix_nextweapon

float nix_nextweapon

Definition at line 35 of file sv_nix.qc.

Referenced by NIX_ChooseNextWeapon(), NIX_GiveCurrentWeapon(), and REGISTER_MUTATOR().

◆ nix_weapon

int nix_weapon

Definition at line 33 of file sv_nix.qc.

Referenced by NIX_ChooseNextWeapon(), and NIX_GiveCurrentWeapon().