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_damage;
28 float autocvar_g_balance_powerup_strength_force;
29 float autocvar_g_balance_powerup_strength_selfdamage;
30 float autocvar_g_balance_powerup_strength_selfforce;
31 float autocvar_g_balance_powerup_strength_time;
32 void powerup_strength_init(Pickup this, entity item)
34 if(!item.strength_finished)
35 item.strength_finished = (item.count) ? item.count : autocvar_g_balance_powerup_strength_time;
38 REGISTER_ITEM(Strength, Powerup) {
39 this.m_canonical_spawnfunc = "item_strength";
41 this.spawnflags = ITEM_FLAG_NORMAL;
42 this.m_model = MDL_Strength_ITEM;
43 this.m_sound = SND_Strength;
45 this.m_respawnsound = SND_STRENGTH_RESPAWN;
47 this.netname = "strength";
48 this.m_name = _("Strength");
49 this.m_icon = "strength";
50 this.m_color = '0 0 1';
51 this.m_waypoint = _("Strength");
52 this.m_waypointblink = 2;
54 this.m_itemid = IT_STRENGTH;
57 this.m_iteminit = powerup_strength_init;
61 SPAWNFUNC_ITEM(item_strength, ITEM_Strength)
64 MODEL(Shield_ITEM, Item_Model("g_invincible.md3"));
65 SOUND(Shield, Item_Sound("powerup_shield"));
69 float autocvar_g_balance_powerup_invincible_takedamage;
70 float autocvar_g_balance_powerup_invincible_takeforce = 0.33;
71 float autocvar_g_balance_powerup_invincible_time;
72 void powerup_shield_init(Pickup this, entity item)
74 if(!item.invincible_finished)
75 item.invincible_finished = (item.count) ? item.count : autocvar_g_balance_powerup_invincible_time;
78 REGISTER_ITEM(Shield, Powerup) {
79 this.m_canonical_spawnfunc = "item_shield";
81 this.spawnflags = ITEM_FLAG_NORMAL;
82 this.m_model = MDL_Shield_ITEM;
83 this.m_sound = SND_Shield;
85 this.m_respawnsound = SND_SHIELD_RESPAWN;
87 this.netname = "invincible";
88 this.m_name = _("Shield");
89 this.m_icon = "shield";
90 this.m_color = '1 0 1';
91 this.m_waypoint = _("Shield");
92 this.m_waypointblink = 2;
94 this.m_itemid = IT_INVINCIBLE;
97 this.m_iteminit = powerup_shield_init;
101 SPAWNFUNC_ITEM(item_shield, ITEM_Shield)
102 SPAWNFUNC_ITEM(item_invincible, ITEM_Shield)