Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
strength.qh
Go to the documentation of this file.
1#pragma once
2
3#include <common/items/all.qh>
5#ifdef SVQC
6 // For FL_POWERUP
7 #include <common/constants.qh>
8 #include <server/items/items.qh>
9#endif
10
11#ifdef GAMEQC
12MODEL(Strength_ITEM, Item_Model("g_strength.md3"));
13SOUND(Strength, Item_Sound("powerup"));
14#endif
15
16#ifdef SVQC
24{
26 def.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
27
28 if(!item.strength_finished)
29 item.strength_finished = (item.count) ? item.count : autocvar_g_balance_powerup_strength_time;
30}
31#endif
32
34 ATTRIB(StrengthItem, m_canonical_spawnfunc, string, "item_strength");
35#ifdef SVQC
36 ATTRIB(StrengthItem, m_iteminit, void(Pickup def, entity item), powerup_strength_init);
37#endif
38#ifdef GAMEQC
41 ATTRIB(StrengthItem, m_model, Model, MDL_Strength_ITEM);
42 ATTRIB(StrengthItem, m_sound, Sound, SND_Strength);
43 ATTRIB(StrengthItem, m_glow, bool, true);
44 ATTRIB(StrengthItem, m_respawnsound, Sound, SND_STRENGTH_RESPAWN);
45#endif
46 ATTRIB(StrengthItem, netname, string, "strength");
47 ATTRIB(StrengthItem, m_name, string, _("Strength"));
48 ATTRIB(StrengthItem, m_icon, string, "strength");
50 ATTRIB(StrengthItem, m_waypoint, string, _("Strength"));
54
55SPAWNFUNC_ITEM(item_strength, ITEM_Strength)
56
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
Definition model.qh:3
ATTRIB(Pickup, m_model, Model)
ATTRIB(StatusEffect, m_name, string)
vector m_color
Definition strength.qh:49
Sound m_respawnsound
Definition strength.qh:44
string m_canonical_spawnfunc
Definition strength.qh:34
string m_icon
Definition strength.qh:48
Model m_model
Definition strength.qh:41
string m_waypoint
Definition strength.qh:50
string m_name
Definition strength.qh:47
string netname
Definition strength.qh:46
Sound m_sound
Definition strength.qh:42
int m_waypointblink
Definition strength.qh:51
const int IT_STRENGTH
Definition item.qh:42
#define SPAWNFUNC_ITEM(name, item)
Definition item.qh:106
@ ITEM_FLAG_MUTATORBLOCKED
Definition item.qh:121
@ ITEM_FLAG_NORMAL
Item is usable during normal gameplay.
Definition item.qh:120
string Item_Model(string item_mdl)
Definition all.qc:8
string Item_Sound(string it_snd)
Definition all.qc:18
#define REGISTER_ITEM(id, inst)
Definition all.qh:13
#define MODEL(name, path)
Definition all.qh:8
#define REGISTER_STATUSEFFECT(id, inst)
Definition all.qh:12
#define NEW(cname,...)
Definition oo.qh:117
#define CLASS(...)
Definition oo.qh:145
#define ENDCLASS(cname)
Definition oo.qh:281
#define ATTRIB(...)
Definition oo.qh:148
vector
Definition self.qh:92
#define SOUND(name, path)
Definition all.qh:30
void powerup_strength_init(Pickup def, entity item)
Definition strength.qh:23
float autocvar_g_balance_powerup_strength_force
Definition strength.qh:19
float autocvar_g_balance_powerup_strength_time
Definition strength.qh:22
float autocvar_g_balance_powerup_strength_selfforce
Definition strength.qh:21
float autocvar_g_balance_powerup_strength_selfdamage
Definition strength.qh:20
bool autocvar_g_powerups_strength
Definition strength.qh:17
float autocvar_g_balance_powerup_strength_damage
Definition strength.qh:18
int autocvar_g_powerups
Definition sv_powerups.qh:7