Xonotic
sv_instagib.qh
Go to the documentation of this file.
1 #pragma once
2 
3 #include "items.qh"
6 
7 // TODO: make this its own mutator (somehow)!
26 
29 
34 
35 void instagib_invisibility(entity this);
36 void instagib_extralife(entity this);
37 void instagib_speed(entity this);
39 
41 {
43  {
44  g_instagib_items = IL_NEW();
45  IL_PUSH(g_instagib_items, ITEM_VaporizerCells);
46  IL_PUSH(g_instagib_items, ITEM_ExtraLife);
47  IL_PUSH(g_instagib_items, ITEM_Invisibility);
48  IL_PUSH(g_instagib_items, ITEM_Speed);
49 
50  ITEM_VaporizerCells.spawnflags &= ~ITEM_FLAG_MUTATORBLOCKED;
51  ITEM_Invisibility.spawnflags &= ~ITEM_FLAG_MUTATORBLOCKED;
52  ITEM_Speed.spawnflags &= ~ITEM_FLAG_MUTATORBLOCKED;
53  }
55  {
56  ITEM_VaporizerCells.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
57  ITEM_Invisibility.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
58  ITEM_Speed.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
59  IL_DELETE(g_instagib_items);
60  }
61 }
REGISTER_MUTATOR(mutator_instagib, autocvar_g_instagib &&!MapInfo_LoadedGametype.m_weaponarena)
Definition: sv_instagib.qh:40
float autocvar_g_rm_laser_rapid
Definition: sv_instagib.qh:21
float autocvar_g_rm_laser_rapid_delay
Definition: sv_instagib.qh:23
float autocvar_g_rm_laser_spread
Definition: sv_instagib.qh:16
#define IL_NEW()
entity() spawn
Gametype MapInfo_LoadedGametype
Definition: mapinfo.qh:193
float autocvar_g_rm_force
Definition: sv_instagib.qh:11
limitations: NULL cannot be present elements can only be present once a maximum of IL_MAX lists can e...
float autocvar_g_rm_laser_count
Definition: sv_instagib.qh:14
void instagib_extralife(entity this)
Definition: sv_instagib.qc:26
#define MUTATOR_ONROLLBACK_OR_REMOVE
Definition: base.qh:286
float autocvar_g_rm_radius
Definition: sv_instagib.qh:12
float autocvar_g_rm_laser_radius
Definition: sv_instagib.qh:24
bool autocvar_g_instagib
Definition: sv_instagib.qh:27
float autocvar_g_instagib_speed_time
Time of speed powerup in seconds.
Definition: sv_instagib.qh:33
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
float autocvar_g_rm_laser_force
Definition: sv_instagib.qh:25
float autocvar_g_rm
Definition: sv_instagib.qh:8
float autocvar_g_rm_laser_damage
Definition: sv_instagib.qh:19
void instagib_invisibility(entity this)
Definition: sv_instagib.qc:20
IntrusiveList g_instagib_items
Definition: sv_instagib.qh:38
#define IL_DELETE(this)
Delete the list.
void instagib_speed(entity this)
Definition: sv_instagib.qc:31
bool m_weaponarena
does this gametype enforce its own weapon arena?
Definition: mapinfo.qh:46
float autocvar_g_rm_edgedamage
Definition: sv_instagib.qh:10
float autocvar_g_rm_laser_speed
Definition: sv_instagib.qh:15
int autocvar_g_instagib_extralives
Definition: sv_instagib.qh:28
float autocvar_g_rm_laser_spread_random
Definition: sv_instagib.qh:17
float autocvar_g_instagib_invisibility_time
Time of invisibility powerup in seconds.
Definition: sv_instagib.qh:31
float autocvar_g_rm_laser_lifetime
Definition: sv_instagib.qh:18
#define MUTATOR_ONADD
Definition: base.qh:284
float autocvar_g_rm_laser_refire
Definition: sv_instagib.qh:20
float autocvar_g_rm_laser_rapid_refire
Definition: sv_instagib.qh:22
float autocvar_g_rm_laser
Definition: sv_instagib.qh:13
float autocvar_g_rm_damage
Definition: sv_instagib.qh:9