]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/item/powerup.qc
Merge branch 'master' into terencehill/translate_colors_2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / powerup.qc
index 2bf0ddfd53f029cae05bc0a95ff2e5c7e0699ddc..375f958a16ddb798c93ab5de7fdfe48f404dabbd 100644 (file)
@@ -1,36 +1,37 @@
 #include "powerup.qh"
-#include "../../../server/t_items.qh"
 
-#define WITH(it) this.m_##it;
-#define CONFIGURE(...) MAP(WITH, __VA_ARGS__)
-#define DEFINE(id, ...)                                                 \
-    REGISTER_ITEM(id, Ammo, LAMBDA(                                     \
-        IF(SV, CONFIGURE                                                \
-        ,   botvalue            =   100000                              \
-        ,   itemflags           =   FL_POWERUP                          \
-        ,   respawntime         =         g_pickup_respawntime_powerup  \
-        ,   respawntimejitter   =   g_pickup_respawntimejitter_powerup  \
-        )                                                               \
-        MAP(IDENTITY, __VA_ARGS__)                                      \
-    ))
+#ifndef MENUQC
+MODEL(Strength_ITEM, Item_Model("g_strength.md3"));
+SOUND(Strength, "misc/powerup");
+#endif
 
-DEFINE(Strength
-    ,IF(ALL, CONFIGURE
-    ,   model               =   "models/items/g_strength.md3"
-    ,   sound               =   "misc/powerup.wav"
-    ,   name                =   "Strength Powerup"
-    ,   itemid              =   IT_STRENGTH
-    )
-)
-DEFINE(Shield
-    ,IF(ALL, CONFIGURE
-    ,   model               =   "models/items/g_invincible.md3"
-    ,   sound               =   "misc/powerup_shield.wav"
-    ,   name                =   "Shield"
-    ,   itemid              =   IT_INVINCIBLE
-    )
-)
+REGISTER_ITEM(Strength, Powerup) {
+#ifndef MENUQC
+    this.m_model            =   MDL_Strength_ITEM;
+    this.m_sound            =   SND_Strength;
+#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;
+}
 
-#undef WITH
-#undef CONFIGURE
-#undef DEFINE
+#ifndef MENUQC
+MODEL(Shield_ITEM, Item_Model("g_invincible.md3"));
+SOUND(Shield, "misc/powerup_shield");
+#endif
+
+REGISTER_ITEM(Shield, Powerup) {
+#ifndef MENUQC
+    this.m_model            =   MDL_Shield_ITEM;
+    this.m_sound            =   SND_Shield;
+#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;
+}