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

Go to the source code of this file.

Classes

class  Health
 

Functions

 REGISTER_ITEM (HealthSmall, Health)
 
 REGISTER_ITEM (HealthMedium, Health)
 
 REGISTER_ITEM (HealthBig, Health)
 
 REGISTER_ITEM (HealthMega, Health)
 

Function Documentation

◆ REGISTER_ITEM() [1/4]

REGISTER_ITEM ( HealthSmall  ,
Health   
)

Definition at line 34 of file health.qh.

References ITEM_FLAG_NORMAL, ITEM_FLAG_RESOURCE, m_name, netname, and spawnflags.

34  {
35  this.m_canonical_spawnfunc = "item_health_small";
36 #ifdef GAMEQC
38  this.m_model = MDL_HealthSmall_ITEM;
39  this.m_sound = SND_HealthSmall;
40 #endif
41  this.netname = "health_small";
42  this.m_name = _("Small health");
43  this.m_icon = "health_small";
44 #ifdef CSQC
45  if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "")
46  this.m_icon = "health"; // compatible with Xonotic v0.8.2 or lower
47 #endif
48 #ifdef SVQC
49  this.m_itemid = IT_RESOURCE;
50  this.m_respawntime = GET(g_pickup_respawntime_short);
51  this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short);
52  this.m_pickupanyway = GET(g_pickup_healthsmall_anyway);
53  this.m_iteminit = item_healthsmall_init;
54 #endif
55 }
Item is usable during normal gameplay.
Definition: item.qh:98
string netname
Definition: powerups.qc:20
int m_itemid
Definition: jetpack.qh:11
float spawnflags
Definition: progsdefs.qc:191
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
Item is is a resource, not a held item.
Definition: item.qh:100
#define GET(name)
Definition: misc.qh:34
string m_name
Definition: scores.qh:135

◆ REGISTER_ITEM() [2/4]

REGISTER_ITEM ( HealthMedium  ,
Health   
)

Definition at line 76 of file health.qh.

References ITEM_FLAG_NORMAL, ITEM_FLAG_RESOURCE, m_name, netname, and spawnflags.

76  {
77  this.m_canonical_spawnfunc = "item_health_medium";
78 #ifdef GAMEQC
80  this.m_model = MDL_HealthMedium_ITEM;
81  this.m_sound = SND_HealthMedium;
82 #endif
83  this.netname = "health_medium";
84  this.m_name = _("Medium health");
85  this.m_icon = "health_medium";
86 #ifdef CSQC
87  if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "")
88  this.m_icon = "health"; // compatible with Xonotic v0.8.2 or lower
89 #endif
90 #ifdef SVQC
91  this.m_itemid = IT_RESOURCE;
92  this.m_respawntime = GET(g_pickup_respawntime_short);
93  this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short);
94  this.m_pickupanyway = GET(g_pickup_healthmedium_anyway);
95  this.m_iteminit = item_healthmedium_init;
96 #endif
97 }
Item is usable during normal gameplay.
Definition: item.qh:98
string netname
Definition: powerups.qc:20
int m_itemid
Definition: jetpack.qh:11
float spawnflags
Definition: progsdefs.qc:191
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
Item is is a resource, not a held item.
Definition: item.qh:100
#define GET(name)
Definition: misc.qh:34
string m_name
Definition: scores.qh:135

◆ REGISTER_ITEM() [3/4]

REGISTER_ITEM ( HealthBig  ,
Health   
)

Definition at line 118 of file health.qh.

References ITEM_FLAG_NORMAL, ITEM_FLAG_RESOURCE, m_name, netname, and spawnflags.

118  {
119  this.m_canonical_spawnfunc = "item_health_big";
120 #ifdef GAMEQC
122  this.m_model = MDL_HealthBig_ITEM;
123  this.m_sound = SND_HealthBig;
124 #endif
125  this.netname = "health_big";
126  this.m_name = _("Big health");
127  this.m_icon = "health_big";
128  this.m_color = '1 0 0';
129  this.m_waypoint = _("Big health");
130 #ifdef CSQC
131  if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "")
132  this.m_icon = "health"; // compatible with Xonotic v0.8.2 or lower
133 #endif
134 #ifdef SVQC
135  this.m_itemid = IT_RESOURCE;
136  this.m_respawntime = GET(g_pickup_respawntime_medium);
137  this.m_respawntimejitter = GET(g_pickup_respawntimejitter_medium);
138  this.m_pickupanyway = GET(g_pickup_healthbig_anyway);
139  this.m_iteminit = item_healthbig_init;
140 #endif
141 }
Item is usable during normal gameplay.
Definition: item.qh:98
string netname
Definition: powerups.qc:20
int m_itemid
Definition: jetpack.qh:11
float spawnflags
Definition: progsdefs.qc:191
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
Item is is a resource, not a held item.
Definition: item.qh:100
#define GET(name)
Definition: misc.qh:34
string m_name
Definition: scores.qh:135

◆ REGISTER_ITEM() [4/4]

REGISTER_ITEM ( HealthMega  ,
Health   
)

Definition at line 162 of file health.qh.

References ITEM_FLAG_NORMAL, ITEM_FLAG_RESOURCE, m_name, netname, and spawnflags.

162  {
163  this.m_canonical_spawnfunc = "item_health_mega";
164 #ifdef GAMEQC
166  this.m_model = MDL_HealthMega_ITEM;
167  this.m_sound = SND_HealthMega;
168 #endif
169  this.netname = "health_mega";
170  this.m_name = _("Mega health");
171  this.m_icon = "health_mega";
172 #ifdef CSQC
173  if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "")
174  this.m_icon = "item_mega_health"; // compatible with Xonotic v0.8.2 or lower
175 #endif
176  this.m_color = '1 0 0';
177  this.m_waypoint = _("Mega health");
178  this.m_waypointblink = 2;
179 #ifdef SVQC
180  this.m_maxs = '16 16 70';
181  this.m_itemid = IT_RESOURCE;
182  this.m_respawntime = GET(g_pickup_respawntime_long);
183  this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long);
184  this.m_pickupanyway = GET(g_pickup_healthmega_anyway);
185  this.m_iteminit = item_healthmega_init;
186 #endif
187 }
Item is usable during normal gameplay.
Definition: item.qh:98
string netname
Definition: powerups.qc:20
int m_itemid
Definition: jetpack.qh:11
float spawnflags
Definition: progsdefs.qc:191
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
Item is is a resource, not a held item.
Definition: item.qh:100
#define GET(name)
Definition: misc.qh:34
string m_name
Definition: scores.qh:135