]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/item/powerup.qh
Increase powerups and megas size. It fixes #192
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / powerup.qh
index d78bd5563e1e6707f8c191bf14294d0dc0582f23..df9315e2c838e72d7153fbcc9e81450c16d8bd91 100644 (file)
@@ -1,18 +1,58 @@
+#pragma once
+
 #ifdef SVQC
     // For FL_POWERUP
-    #include "../../../server/constants.qh"
+    #include <server/constants.qh>
 #endif
 
-#ifndef POWERUP_H
-#define POWERUP_H
 #include "pickup.qh"
 CLASS(Powerup, Pickup)
 #ifdef SVQC
-    ATTRIB(Powerup, m_botvalue, int, 100000)
-    ATTRIB(Powerup, m_itemflags, int, FL_POWERUP)
-    ATTRIB(Powerup, m_respawntime, float(), GET(g_pickup_respawntime_powerup))
-    ATTRIB(Powerup, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_powerup))
+    ATTRIB(Powerup, m_mins, vector, '-16 -16 0');
+    ATTRIB(Powerup, m_maxs, vector, '16 16 80');
+    ATTRIB(Powerup, m_botvalue, int, 100000);
+    ATTRIB(Powerup, m_itemflags, int, FL_POWERUP);
+    ATTRIB(Powerup, m_respawntime, float(), GET(g_pickup_respawntime_powerup));
+    ATTRIB(Powerup, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_powerup));
 #endif
 ENDCLASS(Powerup)
 
+#ifdef GAMEQC
+MODEL(Strength_ITEM, Item_Model("g_strength.md3"));
+SOUND(Strength, "misc/powerup");
+#endif
+
+REGISTER_ITEM(Strength, Powerup) {
+#ifdef GAMEQC
+    this.m_model            =   MDL_Strength_ITEM;
+    this.m_sound            =   SND_Strength;
+    this.m_glow             =   true;
+    this.m_respawnsound     =   SND_STRENGTH_RESPAWN;
+#endif
+    this.m_name             =   "Strength Powerup";
+    this.m_icon             =   "strength";
+    this.m_color            =   '0 0 1';
+    this.m_waypoint         =   _("Strength");
+    this.m_waypointblink    =   2;
+    this.m_itemid           =   IT_STRENGTH;
+}
+
+#ifdef GAMEQC
+MODEL(Shield_ITEM, Item_Model("g_invincible.md3"));
+SOUND(Shield, "misc/powerup_shield");
+#endif
+
+REGISTER_ITEM(Shield, Powerup) {
+#ifdef GAMEQC
+    this.m_model            =   MDL_Shield_ITEM;
+    this.m_sound            =   SND_Shield;
+    this.m_glow             =   true;
+    this.m_respawnsound     =   SND_SHIELD_RESPAWN;
 #endif
+    this.m_name             =   "Shield";
+    this.m_icon             =   "shield";
+    this.m_color            =   '1 0 1';
+    this.m_waypoint         =   _("Shield");
+    this.m_waypointblink    =   2;
+    this.m_itemid           =   IT_INVINCIBLE;
+}