]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/item/armor.qc
Merge branch 'master' into matthiaskrgr/quad_blue
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / armor.qc
index e7965803e2115e1e2f7f631fae6680a878d2eeaa..f8669e0e08503baa95529bef70f2424944ceb159 100644 (file)
@@ -1,11 +1,18 @@
 #include "armor.qh"
 #ifdef SVQC
-    #include "../../../server/t_items.qh"
+    #include <common/t_items.qh>
+#endif
+
+#ifndef MENUQC
+MODEL(ArmorSmall_ITEM, Item_Model("item_armor_small.md3"));
+SOUND(ArmorSmall, "misc/armor1");
 #endif
 
 REGISTER_ITEM(ArmorSmall, Armor) {
-    this.m_model                =   "item_armor_small.md3";
-    this.m_sound                =   "misc/armor1.wav";
+#ifndef MENUQC
+    this.m_model                =   MDL_ArmorSmall_ITEM;
+    this.m_sound                =   SND_ArmorSmall;
+#endif
     this.m_name                 =   "5 Armor";
     this.m_icon                 =   "armor";
 #ifdef SVQC
@@ -16,9 +23,16 @@ REGISTER_ITEM(ArmorSmall, Armor) {
 #endif
 }
 
+#ifndef MENUQC
+MODEL(ArmorMedium_ITEM, Item_Model("item_armor_medium.md3"));
+SOUND(ArmorMedium, "misc/armor10");
+#endif
+
 REGISTER_ITEM(ArmorMedium, Armor) {
-    this.m_model                =   "item_armor_medium.md3";
-    this.m_sound                =   "misc/armor10.wav";
+#ifndef MENUQC
+    this.m_model                =   MDL_ArmorMedium_ITEM;
+    this.m_sound                =   SND_ArmorMedium;
+#endif
     this.m_name                 =   "25 Armor";
     this.m_icon                 =   "armor";
 #ifdef SVQC
@@ -29,9 +43,16 @@ REGISTER_ITEM(ArmorMedium, Armor) {
 #endif
 }
 
+#ifndef MENUQC
+MODEL(ArmorLarge_ITEM, Item_Model("item_armor_big.md3"));
+SOUND(ArmorLarge, "misc/armor17_5");
+#endif
+
 REGISTER_ITEM(ArmorLarge, Armor) {
-    this.m_model                =   "item_armor_big.md3";
-    this.m_sound                =   "misc/armor17_5.wav";
+#ifndef MENUQC
+    this.m_model                =   MDL_ArmorLarge_ITEM;
+    this.m_sound                =   SND_ArmorLarge;
+#endif
     this.m_name                 =   "50 Armor";
     this.m_icon                 =   "armor";
     this.m_color                =   '0 1 0';
@@ -44,9 +65,16 @@ REGISTER_ITEM(ArmorLarge, Armor) {
 #endif
 }
 
+#ifndef MENUQC
+MODEL(ArmorMega_ITEM, Item_Model("item_armor_large.md3"));
+SOUND(ArmorMega, "misc/armor25");
+#endif
+
 REGISTER_ITEM(ArmorMega, Armor) {
-    this.m_model                =   "item_armor_large.md3";
-    this.m_sound                =   "misc/armor25.wav";
+#ifndef MENUQC
+    this.m_model                =   MDL_ArmorMega_ITEM;
+    this.m_sound                =   SND_ArmorMega;
+#endif
     this.m_name                 =   "100 Armor";
     this.m_icon                 =   "item_large_armor";
     this.m_color                =   '0 1 0';