]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mutators/mutator/powerups/powerup/strength.qh
Merge branch 'master' into Mario/status_effects_extended
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / powerups / powerup / strength.qh
1 #pragma once
2
3 #include <common/items/all.qh>
4 #include <common/mutators/mutator/powerups/powerups.qh>
5 #ifdef SVQC
6     // For FL_POWERUP
7     #include <common/constants.qh>
8     #include <server/items/items.qh>
9 #endif
10
11 #ifdef GAMEQC
12 MODEL(Strength_ITEM, Item_Model("g_strength.md3"));
13 SOUND(Strength, Item_Sound("powerup"));
14 #endif
15
16 #ifdef SVQC
17 float autocvar_g_balance_powerup_strength_damage;
18 float autocvar_g_balance_powerup_strength_force;
19 float autocvar_g_balance_powerup_strength_selfdamage;
20 float autocvar_g_balance_powerup_strength_selfforce;
21 float autocvar_g_balance_powerup_strength_time;
22 void powerup_strength_init(Pickup this, entity item)
23 {
24     if(!item.strength_finished)
25         item.strength_finished = autocvar_g_balance_powerup_strength_time;
26 }
27 #endif
28 REGISTER_ITEM(Strength, Powerup) {
29     this.m_canonical_spawnfunc = "item_strength";
30 #ifdef GAMEQC
31         this.spawnflags = ITEM_FLAG_NORMAL;
32     this.m_model            =   MDL_Strength_ITEM;
33     this.m_sound            =   SND_Strength;
34     this.m_glow             =   true;
35     this.m_respawnsound     =   SND_STRENGTH_RESPAWN;
36 #endif
37     this.netname            =   "strength";
38     this.m_name             =   _("Strength");
39     this.m_icon             =   "strength";
40     this.m_color            =   '0 0 1';
41     this.m_waypoint         =   _("Strength");
42     this.m_waypointblink    =   2;
43 #ifdef GAMEQC
44     this.m_itemid           =   IT_STRENGTH;
45 #endif
46 #ifdef SVQC
47     this.m_iteminit         =   powerup_strength_init;
48 #endif
49 }
50
51 SPAWNFUNC_ITEM(item_strength, ITEM_Strength)
52
53 CLASS(Strength, Powerups)
54     ATTRIB(Strength, netname, string, "strength");
55     ATTRIB(Strength, m_name, string, _("Strength"));
56     ATTRIB(Strength, m_icon, string, "strength");
57 ENDCLASS(Strength)
58 REGISTER_STATUSEFFECT(Strength, NEW(Strength));