]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator_instagib_items.qc
Items: Use model registry
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_instagib_items.qc
index 8beec7db2de94177af6921f1592058842cc9d704..87abd78a2c1d1a060fef72b4efd3bf35dda49683 100644 (file)
@@ -5,8 +5,14 @@ float instagib_respawntimejitter_ammo = 0;
 GETTER(float, instagib_respawntime_ammo)
 GETTER(float, instagib_respawntimejitter_ammo)
 
+#ifndef MENUQC
+MODEL(VaporizerCells_ITEM, Item_Model("a_cells.md3"));
+#endif
+
 REGISTER_ITEM(VaporizerCells, Ammo) {
-    this.m_model                =   "a_cells.md3";
+#ifndef MENUQC
+    this.m_model                =   MDL_VaporizerCells_ITEM;
+#endif
     this.m_sound                =   "misc/itempickup.wav";
     this.m_name                 =   "Vaporizer Ammo";
     this.m_icon                 =   "ammo_supercells";
@@ -18,8 +24,14 @@ REGISTER_ITEM(VaporizerCells, Ammo) {
 #endif
 }
 
+#ifndef MENUQC
+MODEL(ExtraLife_ITEM, Item_Model("g_h100.md3"));
+#endif
+
 REGISTER_ITEM(ExtraLife, Powerup) {
-    this.m_model                =   "g_h100.md3";
+#ifndef MENUQC
+    this.m_model                =   MDL_ExtraLife_ITEM;
+#endif
     this.m_sound                =   "misc/megahealth.wav";
     this.m_name                 =   "Extra life";
     this.m_icon                 =   "item_mega_health";
@@ -29,8 +41,14 @@ REGISTER_ITEM(ExtraLife, Powerup) {
     this.m_itemid               =   IT_NAILS;
 }
 
+#ifndef MENUQC
+MODEL(Invisibility_ITEM, Item_Model("g_strength.md3"));
+#endif
+
 REGISTER_ITEM(Invisibility, Powerup) {
-    this.m_model            =   "g_strength.md3";
+#ifndef MENUQC
+    this.m_model            =   MDL_Invisibility_ITEM;
+#endif
     this.m_sound            =   "misc/powerup.wav";
     this.m_name             =   "Invisibility";
     this.m_icon             =   "strength";
@@ -40,8 +58,14 @@ REGISTER_ITEM(Invisibility, Powerup) {
     this.m_itemid           =   IT_STRENGTH;
 }
 
+#ifndef MENUQC
+MODEL(Speed_ITEM, Item_Model("g_invincible.md3"));
+#endif
+
 REGISTER_ITEM(Speed, Powerup) {
-    this.m_model            =   "g_invincible.md3";
+#ifndef MENUQC
+    this.m_model            =   MDL_Speed_ITEM;
+#endif
     this.m_sound            =   "misc/powerup_shield.wav";
     this.m_name             =   "Speed";
     this.m_icon             =   "shield";