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

Go to the source code of this file.

Functions

void instagib_extralife (entity this)
 
void instagib_invisibility (entity this)
 
void instagib_speed (entity this)
 
 REGISTER_MUTATOR (mutator_instagib, autocvar_g_instagib &&!MapInfo_LoadedGametype.m_weaponarena)
 

Variables

bool autocvar_g_instagib
 
int autocvar_g_instagib_extralives
 
float autocvar_g_instagib_invisibility_time
 Time of invisibility powerup in seconds. More...
 
float autocvar_g_instagib_speed_time
 Time of speed powerup in seconds. More...
 
float autocvar_g_rm
 
float autocvar_g_rm_damage
 
float autocvar_g_rm_edgedamage
 
float autocvar_g_rm_force
 
float autocvar_g_rm_laser
 
float autocvar_g_rm_laser_count
 
float autocvar_g_rm_laser_damage
 
float autocvar_g_rm_laser_force
 
float autocvar_g_rm_laser_lifetime
 
float autocvar_g_rm_laser_radius
 
float autocvar_g_rm_laser_rapid
 
float autocvar_g_rm_laser_rapid_delay
 
float autocvar_g_rm_laser_rapid_refire
 
float autocvar_g_rm_laser_refire
 
float autocvar_g_rm_laser_speed
 
float autocvar_g_rm_laser_spread
 
float autocvar_g_rm_laser_spread_random
 
float autocvar_g_rm_radius
 
IntrusiveList g_instagib_items
 

Function Documentation

◆ instagib_extralife()

void instagib_extralife ( entity  this)

Definition at line 26 of file sv_instagib.qc.

References StartItem().

Referenced by MUTATOR_HOOKFUNCTION().

27 {
28  StartItem(this, ITEM_ExtraLife);
29 }
void StartItem(entity this, GameItem def)
Definition: items.qc:1148
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instagib_invisibility()

void instagib_invisibility ( entity  this)

Definition at line 20 of file sv_instagib.qc.

References autocvar_g_instagib_invisibility_time, and StartItem().

Referenced by MUTATOR_HOOKFUNCTION().

21 {
22  this.invisibility_finished = autocvar_g_instagib_invisibility_time;
23  StartItem(this, ITEM_Invisibility);
24 }
void StartItem(entity this, GameItem def)
Definition: items.qc:1148
float autocvar_g_instagib_invisibility_time
Time of invisibility powerup in seconds.
Definition: sv_instagib.qh:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instagib_speed()

void instagib_speed ( entity  this)

Definition at line 31 of file sv_instagib.qc.

References autocvar_g_instagib_speed_time, and StartItem().

Referenced by MUTATOR_HOOKFUNCTION().

32 {
33  this.speed_finished = autocvar_g_instagib_speed_time;
34  StartItem(this, ITEM_Speed);
35 }
float autocvar_g_instagib_speed_time
Time of speed powerup in seconds.
Definition: sv_instagib.qh:33
void StartItem(entity this, GameItem def)
Definition: items.qc:1148
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ REGISTER_MUTATOR()

REGISTER_MUTATOR ( mutator_instagib  ,
autocvar_g_instagib &&!MapInfo_LoadedGametype.  m_weaponarena 
)

Definition at line 40 of file sv_instagib.qh.

References IL_DELETE, IL_NEW, IL_PUSH(), ITEM_FLAG_MUTATORBLOCKED, MUTATOR_ONADD, and MUTATOR_ONROLLBACK_OR_REMOVE.

41 {
43  {
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;
60  }
61 }
#define IL_NEW()
#define MUTATOR_ONROLLBACK_OR_REMOVE
Definition: base.qh:286
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
IntrusiveList g_instagib_items
Definition: sv_instagib.qh:38
#define IL_DELETE(this)
Delete the list.
#define MUTATOR_ONADD
Definition: base.qh:284
+ Here is the call graph for this function:

Variable Documentation

◆ autocvar_g_instagib

bool autocvar_g_instagib

Definition at line 27 of file sv_instagib.qh.

◆ autocvar_g_instagib_extralives

int autocvar_g_instagib_extralives

Definition at line 28 of file sv_instagib.qh.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_instagib_invisibility_time

float autocvar_g_instagib_invisibility_time

Time of invisibility powerup in seconds.

Definition at line 31 of file sv_instagib.qh.

Referenced by instagib_invisibility().

◆ autocvar_g_instagib_speed_time

float autocvar_g_instagib_speed_time

Time of speed powerup in seconds.

Definition at line 33 of file sv_instagib.qh.

Referenced by instagib_speed().

◆ autocvar_g_rm

float autocvar_g_rm

Definition at line 8 of file sv_instagib.qh.

Referenced by instagib_ammocheck(), and MUTATOR_HOOKFUNCTION().

◆ autocvar_g_rm_damage

float autocvar_g_rm_damage

Definition at line 9 of file sv_instagib.qh.

◆ autocvar_g_rm_edgedamage

float autocvar_g_rm_edgedamage

Definition at line 10 of file sv_instagib.qh.

◆ autocvar_g_rm_force

float autocvar_g_rm_force

Definition at line 11 of file sv_instagib.qh.

◆ autocvar_g_rm_laser

float autocvar_g_rm_laser

Definition at line 13 of file sv_instagib.qh.

Referenced by instagib_ammocheck(), and MUTATOR_HOOKFUNCTION().

◆ autocvar_g_rm_laser_count

float autocvar_g_rm_laser_count

Definition at line 14 of file sv_instagib.qh.

◆ autocvar_g_rm_laser_damage

float autocvar_g_rm_laser_damage

Definition at line 19 of file sv_instagib.qh.

◆ autocvar_g_rm_laser_force

float autocvar_g_rm_laser_force

Definition at line 25 of file sv_instagib.qh.

◆ autocvar_g_rm_laser_lifetime

float autocvar_g_rm_laser_lifetime

Definition at line 18 of file sv_instagib.qh.

◆ autocvar_g_rm_laser_radius

float autocvar_g_rm_laser_radius

Definition at line 24 of file sv_instagib.qh.

◆ autocvar_g_rm_laser_rapid

float autocvar_g_rm_laser_rapid

Definition at line 21 of file sv_instagib.qh.

◆ autocvar_g_rm_laser_rapid_delay

float autocvar_g_rm_laser_rapid_delay

Definition at line 23 of file sv_instagib.qh.

◆ autocvar_g_rm_laser_rapid_refire

float autocvar_g_rm_laser_rapid_refire

Definition at line 22 of file sv_instagib.qh.

◆ autocvar_g_rm_laser_refire

float autocvar_g_rm_laser_refire

Definition at line 20 of file sv_instagib.qh.

◆ autocvar_g_rm_laser_speed

float autocvar_g_rm_laser_speed

Definition at line 15 of file sv_instagib.qh.

◆ autocvar_g_rm_laser_spread

float autocvar_g_rm_laser_spread

Definition at line 16 of file sv_instagib.qh.

◆ autocvar_g_rm_laser_spread_random

float autocvar_g_rm_laser_spread_random

Definition at line 17 of file sv_instagib.qh.

◆ autocvar_g_rm_radius

float autocvar_g_rm_radius

Definition at line 12 of file sv_instagib.qh.

◆ g_instagib_items

IntrusiveList g_instagib_items

Definition at line 38 of file sv_instagib.qh.

Referenced by RandomItems_GetRandomInstagibItemClassName().