5 #include <server/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, 20000);
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));
21 MODEL(Strength_ITEM, Item_Model("g_strength.md3"));
22 SOUND(Strength, Item_Sound("powerup"));
26 float autocvar_g_balance_powerup_strength_time;
27 void powerup_strength_init(Pickup this, entity item)
29 if(!item.strength_finished)
30 item.strength_finished = autocvar_g_balance_powerup_strength_time;
33 REGISTER_ITEM(Strength, Powerup) {
34 this.m_canonical_spawnfunc = "item_strength";
36 this.spawnflags = ITEM_FLAG_NORMAL;
37 this.m_model = MDL_Strength_ITEM;
38 this.m_sound = SND_Strength;
40 this.m_respawnsound = SND_STRENGTH_RESPAWN;
42 this.netname = "strength";
43 this.m_name = "Strength Powerup";
44 this.m_icon = "strength";
45 this.m_color = '0 0 1';
46 this.m_waypoint = _("Strength");
47 this.m_waypointblink = 2;
48 this.m_itemid = IT_STRENGTH;
50 this.m_iteminit = powerup_strength_init;
54 SPAWNFUNC_ITEM(item_strength, ITEM_Strength)
57 MODEL(Shield_ITEM, Item_Model("g_invincible.md3"));
58 SOUND(Shield, Item_Sound("powerup_shield"));
62 float autocvar_g_balance_powerup_invincible_time;
63 void powerup_shield_init(Pickup this, entity item)
65 if(!item.invincible_finished)
66 item.invincible_finished = autocvar_g_balance_powerup_invincible_time;
69 REGISTER_ITEM(Shield, Powerup) {
70 this.m_canonical_spawnfunc = "item_shield";
72 this.spawnflags = ITEM_FLAG_NORMAL;
73 this.m_model = MDL_Shield_ITEM;
74 this.m_sound = SND_Shield;
76 this.m_respawnsound = SND_SHIELD_RESPAWN;
78 this.netname = "invincible";
79 this.m_name = "Shield";
80 this.m_icon = "shield";
81 this.m_color = '1 0 1';
82 this.m_waypoint = _("Shield");
83 this.m_waypointblink = 2;
84 this.m_itemid = IT_INVINCIBLE;
86 this.m_iteminit = powerup_shield_init;
90 SPAWNFUNC_ITEM(item_shield, ITEM_Shield)
91 SPAWNFUNC_ITEM(item_invincible, ITEM_Shield)