3 #include <common/items/all.qh>
4 #include <common/mutators/mutator/powerups/powerups.qh>
7 #include <common/constants.qh>
8 #include <server/items/items.qh>
12 MODEL(Strength_ITEM, Item_Model("g_strength.md3"));
13 SOUND(Strength, Item_Sound("powerup"));
17 bool autocvar_g_powerups_strength = 1;
18 float autocvar_g_balance_powerup_strength_damage;
19 float autocvar_g_balance_powerup_strength_force;
20 float autocvar_g_balance_powerup_strength_selfdamage;
21 float autocvar_g_balance_powerup_strength_selfforce;
22 float autocvar_g_balance_powerup_strength_time;
23 void powerup_strength_init(Pickup this, entity item)
25 if(autocvar_g_powerups_strength)
26 this.spawnflags = ITEM_FLAG_NORMAL;
28 this.spawnflags = ITEM_FLAG_MUTATORBLOCKED;
30 if(!item.strength_finished)
31 item.strength_finished = (item.count) ? item.count : autocvar_g_balance_powerup_strength_time;
34 REGISTER_ITEM(Strength, Powerup) {
35 this.m_canonical_spawnfunc = "item_strength";
37 this.m_iteminit = powerup_strength_init;
40 this.m_itemid = IT_STRENGTH;
41 this.m_model = MDL_Strength_ITEM;
42 this.m_sound = SND_Strength;
44 this.m_respawnsound = SND_STRENGTH_RESPAWN;
46 this.netname = "strength";
47 this.m_name = _("Strength");
48 this.m_icon = "strength";
49 this.m_color = '0 0 1';
50 this.m_waypoint = _("Strength");
51 this.m_waypointblink = 2;
54 SPAWNFUNC_ITEM(item_strength, ITEM_Strength)
56 CLASS(Strength, Powerups)
57 ATTRIB(Strength, netname, string, "strength");
58 ATTRIB(Strength, m_name, string, _("Strength"));
59 ATTRIB(Strength, m_icon, string, "strength");
61 REGISTER_STATUSEFFECT(Strength, NEW(Strength));