]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/items/item/powerup.qh
Merge branch 'master' into TimePath/modules
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / powerup.qh
1 #pragma once
2
3 #ifdef SVQC
4     // For FL_POWERUP
5     #include <server/constants.qh>
6 #endif
7
8 #include "pickup.qh"
9 CLASS(Powerup, Pickup)
10 #ifdef SVQC
11     ATTRIB(Powerup, m_mins, vector, '-16 -16 0');
12     ATTRIB(Powerup, m_maxs, vector, '16 16 48');
13     ATTRIB(Powerup, m_botvalue, int, 100000);
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 #endif
18 ENDCLASS(Powerup)
19
20 #ifndef MENUQC
21 MODEL(Strength_ITEM, Item_Model("g_strength.md3"));
22 SOUND(Strength, "misc/powerup");
23 #endif
24
25 REGISTER_ITEM(Strength, Powerup) {
26 #ifndef MENUQC
27     this.m_model            =   MDL_Strength_ITEM;
28     this.m_sound            =   SND_Strength;
29 #endif
30     this.m_name             =   "Strength Powerup";
31     this.m_icon             =   "strength";
32     this.m_color            =   '0 0 1';
33     this.m_waypoint         =   _("Strength");
34     this.m_waypointblink    =   2;
35     this.m_itemid           =   IT_STRENGTH;
36 }
37
38 #ifndef MENUQC
39 MODEL(Shield_ITEM, Item_Model("g_invincible.md3"));
40 SOUND(Shield, "misc/powerup_shield");
41 #endif
42
43 REGISTER_ITEM(Shield, Powerup) {
44 #ifndef MENUQC
45     this.m_model            =   MDL_Shield_ITEM;
46     this.m_sound            =   SND_Shield;
47 #endif
48     this.m_name             =   "Shield";
49     this.m_icon             =   "shield";
50     this.m_color            =   '1 0 1';
51     this.m_waypoint         =   _("Shield");
52     this.m_waypointblink    =   2;
53     this.m_itemid           =   IT_INVINCIBLE;
54 }