]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/item/armor.qc
Merge branch 'maint' (early part before Transifex)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / armor.qc
index 3dac22a5966c49338c2a37afb8e66c5d5e7b3e76..0db9d1f70e8bf0f75344125ca0268512949763f1 100644 (file)
@@ -1,49 +1,52 @@
 #include "armor.qh"
-#include "../../../server/t_items.qh"
+#ifdef SVQC
+    #include "../../../server/t_items.qh"
+#endif
 
-#define REGISTER_ARMOR(id, model, sound, resp, name, itemid, botvalue)  \
-REGISTER_ITEM(id, Armor, LAMBDA({                                       \
-    this.m_model = model;                                               \
-    this.m_sound = sound;                                               \
-    this.m_respawntime = resp;                                          \
-    this.m_respawntimejitter = resp;                                    \
-    this.m_name = name;                                                 \
-    this.m_itemid = itemid;                                             \
-    this.m_botvalue = botvalue;                                         \
-}))
+REGISTER_ITEM(ArmorSmall, Armor) {
+    this.m_model                =   "models/items/item_armor_small.md3";
+    this.m_sound                =   "misc/armor1.wav";
+    this.m_name                 =   "5 Armor";
+#ifdef SVQC
+    this.m_botvalue             =   BOT_PICKUP_RATING_LOW;
+    this.m_itemid               =   IT_ARMOR_SHARD;
+    this.m_respawntime          =   GET(g_pickup_respawntime_short);
+    this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_short);
+#endif
+}
 
-REGISTER_ARMOR(ArmorSmall
-    , "models/items/item_armor_small.md3"
-    , "misc/armor1.wav"
-    , SPAWNTIME_SHORT
-    , "5 Armor"
-    , IT_ARMOR_SHARD
-    , BOT_PICKUP_RATING_LOW
-)
+REGISTER_ITEM(ArmorMedium, Armor) {
+    this.m_model                =   "models/items/item_armor_medium.md3";
+    this.m_sound                =   "misc/armor10.wav";
+    this.m_name                 =   "25 Armor";
+#ifdef SVQC
+    this.m_botvalue             =   BOT_PICKUP_RATING_MID;
+    this.m_itemid               =   IT_ARMOR;
+    this.m_respawntime          =   GET(g_pickup_respawntime_medium);
+    this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_medium);
+#endif
+}
 
-REGISTER_ARMOR(ArmorMedium
-    , "models/items/item_armor_medium.md3"
-    , "misc/armor10.wav"
-    , SPAWNTIME_MEDIUM
-    , "25 Armor"
-    , IT_ARMOR
-    , BOT_PICKUP_RATING_MID
-)
+REGISTER_ITEM(ArmorBig, Armor) {
+    this.m_model                =   "models/items/item_armor_big.md3";
+    this.m_sound                =   "misc/armor17_5.wav";
+    this.m_name                 =   "50 Armor";
+#ifdef SVQC
+    this.m_botvalue             =   20000; // FIXME: higher than BOT_PICKUP_RATING_HIGH?
+    this.m_itemid               =   IT_ARMOR;
+    this.m_respawntime          =   GET(g_pickup_respawntime_long);
+    this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_long);
+#endif
+}
 
-REGISTER_ARMOR(ArmorBig
-    , "models/items/item_armor_big.md3"
-    , "misc/armor17_5.wav"
-    , SPAWNTIME_LONG
-    , "50 Armor"
-    , IT_ARMOR
-    , 20000 // FIXME: higher than BOT_PICKUP_RATING_HIGH?
-)
-
-REGISTER_ARMOR(ArmorLarge
-    , "models/items/item_armor_large.md3"
-    , "misc/armor25.wav"
-    , SPAWNTIME_LONG
-    , "100 Armor"
-    , IT_ARMOR
-    , BOT_PICKUP_RATING_HIGH
-)
+REGISTER_ITEM(ArmorLarge, Armor) {
+    this.m_model                =   "models/items/item_armor_large.md3";
+    this.m_sound                =   "misc/armor25.wav";
+    this.m_name                 =   "100 Armor";
+#ifdef SVQC
+    this.m_botvalue             =   BOT_PICKUP_RATING_HIGH;
+    this.m_itemid               =   IT_ARMOR;
+    this.m_respawntime          =   GET(g_pickup_respawntime_long);
+    this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_long);
+#endif
+}