Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
shield.qh File Reference
Include dependency graph for shield.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ShieldItem
class  ShieldStatusEffect

Functions

 MODEL (Shield_ITEM, Item_Model("g_invincible.md3"))
void powerup_shield_init (Pickup def, entity item)
 REGISTER_ITEM (Shield, NEW(ShieldItem))
 REGISTER_STATUSEFFECT (Shield, NEW(ShieldStatusEffect))
 SOUND (Shield, Item_Sound("powerup_shield"))

Variables

float autocvar_g_balance_powerup_invincible_takedamage
float autocvar_g_balance_powerup_invincible_takeforce
float autocvar_g_balance_powerup_invincible_time
bool autocvar_g_powerups_shield

Function Documentation

◆ MODEL()

MODEL ( Shield_ITEM ,
Item_Model("g_invincible.md3")  )

◆ powerup_shield_init()

void powerup_shield_init ( Pickup def,
entity item )

Definition at line 21 of file shield.qh.

22{
24 def.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
25
26 if(!item.invincible_finished)
27 item.invincible_finished = (item.count) ? item.count : autocvar_g_balance_powerup_invincible_time;
28}
@ ITEM_FLAG_MUTATORBLOCKED
Definition item.qh:121
float autocvar_g_balance_powerup_invincible_time
Definition shield.qh:20
bool autocvar_g_powerups_shield
Definition shield.qh:17
int autocvar_g_powerups
Definition sv_powerups.qh:7

References autocvar_g_balance_powerup_invincible_time, autocvar_g_powerups, autocvar_g_powerups_shield, entity(), and ITEM_FLAG_MUTATORBLOCKED.

Referenced by ShieldItem::void().

◆ REGISTER_ITEM()

REGISTER_ITEM ( Shield ,
NEW(ShieldItem)  )

References NEW, REGISTER_ITEM, and SPAWNFUNC_ITEM.

◆ REGISTER_STATUSEFFECT()

REGISTER_STATUSEFFECT ( Shield ,
NEW(ShieldStatusEffect)  )

References NEW, and REGISTER_STATUSEFFECT.

◆ SOUND()

SOUND ( Shield ,
Item_Sound("powerup_shield")  )

Variable Documentation

◆ autocvar_g_balance_powerup_invincible_takedamage

float autocvar_g_balance_powerup_invincible_takedamage

Definition at line 18 of file shield.qh.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_balance_powerup_invincible_takeforce

float autocvar_g_balance_powerup_invincible_takeforce

Definition at line 19 of file shield.qh.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_balance_powerup_invincible_time

float autocvar_g_balance_powerup_invincible_time

Definition at line 20 of file shield.qh.

Referenced by powerup_shield_init(), powerups_DropItem(), and spawnfunc().

◆ autocvar_g_powerups_shield

bool autocvar_g_powerups_shield

Definition at line 17 of file shield.qh.

Referenced by powerup_shield_init().