Xonotic
powerups.qh File Reference
#include "../panel.qh"
+ Include dependency graph for powerups.qh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void addPowerupItem (string name, string icon, vector color, float currentTime, float lifeTime, bool isInfinite)
 

Variables

bool autocvar_hud_panel_powerups
 
int autocvar_hud_panel_powerups_baralign
 
bool autocvar_hud_panel_powerups_dynamichud = true
 
bool autocvar_hud_panel_powerups_hide_ondeath = false
 
int autocvar_hud_panel_powerups_iconalign
 
bool autocvar_hud_panel_powerups_progressbar
 
bool autocvar_hud_panel_powerups_text
 
vector autocvar_hud_progressbar_shield_color
 
vector autocvar_hud_progressbar_strength_color
 
vector autocvar_hud_progressbar_superweapons_color
 

Function Documentation

◆ addPowerupItem()

void addPowerupItem ( string  name,
string  icon,
vector  color,
float  currentTime,
float  lifeTime,
bool  isInfinite 
)

Definition at line 38 of file powerups.qc.

References color, entity(), name, powerupItems, powerupItemsCount, and spawn().

39 {
40  if(!powerupItems)
41  powerupItems = spawn();
42 
43  entity item;
44  for(item = powerupItems; item.count; item = item.chain)
45  if(!item.chain)
46  item.chain = spawn();
47 
48  item.message = name;
49  item.netname = icon;
50  item.colormod = color;
51  item.count = currentTime;
52  item.lifetime = lifeTime;
53  item.cnt = isInfinite;
54 
56 }
vector color
int powerupItemsCount
Definition: powerups.qc:27
entity() spawn
entity powerupItems
Definition: powerups.qc:26
+ Here is the call graph for this function:

Variable Documentation

◆ autocvar_hud_panel_powerups

bool autocvar_hud_panel_powerups

Definition at line 4 of file powerups.qh.

Referenced by HUD_Powerups().

◆ autocvar_hud_panel_powerups_baralign

int autocvar_hud_panel_powerups_baralign

Definition at line 5 of file powerups.qh.

Referenced by HUD_Powerups().

◆ autocvar_hud_panel_powerups_dynamichud

bool autocvar_hud_panel_powerups_dynamichud = true

Definition at line 6 of file powerups.qh.

Referenced by HUD_Powerups().

◆ autocvar_hud_panel_powerups_hide_ondeath

bool autocvar_hud_panel_powerups_hide_ondeath = false

Definition at line 7 of file powerups.qh.

Referenced by HUD_Powerups().

◆ autocvar_hud_panel_powerups_iconalign

int autocvar_hud_panel_powerups_iconalign

Definition at line 8 of file powerups.qh.

Referenced by HUD_Powerups().

◆ autocvar_hud_panel_powerups_progressbar

bool autocvar_hud_panel_powerups_progressbar

Definition at line 9 of file powerups.qh.

Referenced by HUD_Powerups().

◆ autocvar_hud_panel_powerups_text

bool autocvar_hud_panel_powerups_text

Definition at line 10 of file powerups.qh.

Referenced by HUD_Powerups().

◆ autocvar_hud_progressbar_shield_color

vector autocvar_hud_progressbar_shield_color

Definition at line 12 of file powerups.qh.

◆ autocvar_hud_progressbar_strength_color

vector autocvar_hud_progressbar_strength_color

Definition at line 13 of file powerups.qh.

◆ autocvar_hud_progressbar_superweapons_color

vector autocvar_hud_progressbar_superweapons_color

Definition at line 14 of file powerups.qh.