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(Speed_ITEM, Item_Model("g_invincible.md3"));
13 SOUND(Speed, Item_Sound("powerup_shield"));
17 .float speed_finished;
19 float autocvar_g_balance_powerup_speed_attackrate = 0.8;
20 float autocvar_g_balance_powerup_speed_highspeed = 1.5;
21 float autocvar_g_balance_powerup_speed_time = 30;
22 void powerup_speed_init(Pickup this, entity item)
24 if(!item.speed_finished)
25 item.speed_finished = autocvar_g_balance_powerup_speed_time;
28 REGISTER_ITEM(Speed, Powerup) {
29 this.m_canonical_spawnfunc = "item_speed";
31 this.spawnflags = ITEM_FLAG_MUTATORBLOCKED; // TODO: ITEM_FLAG_NORMAL (once it has a model!)
32 this.m_model = MDL_Speed_ITEM;
33 this.m_sound = SND_Speed;
35 this.m_respawnsound = SND_SHIELD_RESPAWN;
37 this.netname = "speed";
38 this.m_name = _("Speed");
39 this.m_icon = "buff_speed";
40 this.m_color = '0.1 1 0.84';
41 this.m_waypoint = _("Speed");
42 this.m_waypointblink = 2;
44 this.m_itemid = IT_SPEED;
47 this.m_iteminit = powerup_speed_init;
51 SPAWNFUNC_ITEM(item_speed, ITEM_Speed)
53 CLASS(Speed, Powerups)
54 ATTRIB(Speed, netname, string, "speed");
55 ATTRIB(Speed, m_name, string, _("Speed"));
56 ATTRIB(Speed, m_color, vector, '0.1 1 0.84');
57 ATTRIB(Speed, m_icon, string, "buff_speed");
59 REGISTER_STATUSEFFECT(Speed, NEW(Speed));