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;
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 def, entity item)
25 if(!autocvar_g_powerups || !autocvar_g_powerups_strength)
26 def.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
28 if(!item.strength_finished)
29 item.strength_finished = (item.count) ? item.count : autocvar_g_balance_powerup_strength_time;
32 REGISTER_ITEM(Strength, Powerup) {
33 this.m_canonical_spawnfunc = "item_strength";
35 this.m_iteminit = powerup_strength_init;
38 this.spawnflags = ITEM_FLAG_NORMAL;
39 this.m_itemid = IT_STRENGTH;
40 this.m_model = MDL_Strength_ITEM;
41 this.m_sound = SND_Strength;
43 this.m_respawnsound = SND_STRENGTH_RESPAWN;
45 this.netname = "strength";
46 this.m_name = _("Strength");
47 this.m_icon = "strength";
48 this.m_color = '0 0 1';
49 this.m_waypoint = _("Strength");
50 this.m_waypointblink = 2;
53 SPAWNFUNC_ITEM(item_strength, ITEM_Strength)
55 CLASS(Strength, Powerups)
56 ATTRIB(Strength, netname, string, "strength");
57 ATTRIB(Strength, m_name, string, _("Strength"));
58 ATTRIB(Strength, m_icon, string, "strength");
60 REGISTER_STATUSEFFECT(Strength, NEW(Strength));