Xonotic
sv_overkill.qh
Go to the documentation of this file.
1 #pragma once
2 
8 
9 .float ok_item;
11 
13 {
15  {
16  precache_all_playermodels("models/ok_player/*.dpm");
17 
19  {
20  ITEM_HealthMega.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
21  }
23  {
24  ITEM_ArmorMedium.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
25  }
27  {
28  ITEM_ArmorBig.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
29  }
31  {
32  ITEM_ArmorMega.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
33  }
34  g_overkill_items = IL_NEW();
35  IL_PUSH(g_overkill_items, ITEM_HealthMega);
36  IL_PUSH(g_overkill_items, ITEM_ArmorSmall);
37  IL_PUSH(g_overkill_items, ITEM_ArmorMedium);
38  IL_PUSH(g_overkill_items, ITEM_ArmorBig);
39  IL_PUSH(g_overkill_items, ITEM_ArmorMega);
40  }
41 
43  {
44  ITEM_HealthMega.spawnflags &= ~ITEM_FLAG_MUTATORBLOCKED;
45  ITEM_ArmorMedium.spawnflags &= ~ITEM_FLAG_MUTATORBLOCKED;
46  ITEM_ArmorBig.spawnflags &= ~ITEM_FLAG_MUTATORBLOCKED;
47  ITEM_ArmorMega.spawnflags &= ~ITEM_FLAG_MUTATORBLOCKED;
48  IL_DELETE(g_overkill_items);
49  }
50 }
#define IL_NEW()
Gametype MapInfo_LoadedGametype
Definition: mapinfo.qh:193
limitations: NULL cannot be present elements can only be present once a maximum of IL_MAX lists can e...
bool autocvar_g_overkill_filter_healthmega
Definition: sv_overkill.qh:4
float ok_item
Definition: sv_overkill.qh:9
bool autocvar_g_overkill_filter_armorbig
Definition: sv_overkill.qh:6
#define MUTATOR_IS_ENABLED(this)
Definition: base.qh:176
bool autocvar_g_overkill_filter_armormedium
Definition: sv_overkill.qh:5
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
IntrusiveList g_overkill_items
Definition: sv_overkill.qh:10
string autocvar_g_overkill
Definition: sv_overkill.qh:3
#define IL_DELETE(this)
Delete the list.
bool autocvar_g_overkill_filter_armormega
Definition: sv_overkill.qh:7
bool m_weaponarena
does this gametype enforce its own weapon arena?
Definition: mapinfo.qh:46
#define MUTATOR_ONREMOVE
Definition: base.qh:285
#define MUTATOR_ONADD
Definition: base.qh:284
REGISTER_MUTATOR(ok, expr_evaluate(autocvar_g_overkill) &&!MUTATOR_IS_ENABLED(mutator_instagib) &&!MapInfo_LoadedGametype.m_weaponarena &&cvar_string("g_mod_balance")=="Overkill")
Definition: sv_overkill.qh:12
void precache_all_playermodels(string pattern)
Definition: player.qc:651
ERASEABLE bool expr_evaluate(string s)
Evaluate an expression of the form: [+ | -]? [var[op]val | [op]var | val | var] ...
Definition: cvar.qh:48