5 #include <common/constants.qh>
11 ATTRIB(Powerup, m_mins, vector, '-16 -16 0');
12 ATTRIB(Powerup, m_maxs, vector, '16 16 80');
13 ATTRIB(Powerup, m_botvalue, int, 11000);
14 ATTRIB(Powerup, m_itemflags, int, FL_POWERUP);
15 ATTRIB(Powerup, m_respawntime, float(), GET(g_pickup_respawntime_powerup));
16 ATTRIB(Powerup, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_powerup));
17 ATTRIB(Powerup, count, float);
22 MODEL(Strength_ITEM, Item_Model("g_strength.md3"));
23 SOUND(Strength, Item_Sound("powerup"));
27 float autocvar_g_balance_powerup_strength_time;
28 void powerup_strength_init(Pickup this, entity item)
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.spawnflags = ITEM_FLAG_NORMAL;
38 this.m_model = MDL_Strength_ITEM;
39 this.m_sound = SND_Strength;
41 this.m_respawnsound = SND_STRENGTH_RESPAWN;
43 this.netname = "strength";
44 this.m_name = _("Strength");
45 this.m_icon = "strength";
46 this.m_color = '0 0 1';
47 this.m_waypoint = _("Strength");
48 this.m_waypointblink = 2;
50 this.m_itemid = IT_STRENGTH;
53 this.m_iteminit = powerup_strength_init;
57 SPAWNFUNC_ITEM(item_strength, ITEM_Strength)
60 MODEL(Shield_ITEM, Item_Model("g_invincible.md3"));
61 SOUND(Shield, Item_Sound("powerup_shield"));
65 float autocvar_g_balance_powerup_invincible_time;
66 void powerup_shield_init(Pickup this, entity item)
68 if(!item.invincible_finished)
69 item.invincible_finished = (item.count) ? item.count : autocvar_g_balance_powerup_invincible_time;
72 REGISTER_ITEM(Shield, Powerup) {
73 this.m_canonical_spawnfunc = "item_shield";
75 this.spawnflags = ITEM_FLAG_NORMAL;
76 this.m_model = MDL_Shield_ITEM;
77 this.m_sound = SND_Shield;
79 this.m_respawnsound = SND_SHIELD_RESPAWN;
81 this.netname = "invincible";
82 this.m_name = _("Shield");
83 this.m_icon = "shield";
84 this.m_color = '1 0 1';
85 this.m_waypoint = _("Shield");
86 this.m_waypointblink = 2;
88 this.m_itemid = IT_INVINCIBLE;
91 this.m_iteminit = powerup_shield_init;
95 SPAWNFUNC_ITEM(item_shield, ITEM_Shield)
96 SPAWNFUNC_ITEM(item_invincible, ITEM_Shield)