]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/instagib/items.qh
For sanity, give items an identifier name (like all other registries)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / instagib / items.qh
index 7736fa7b30a1dea2d07f6305a5f55db19ef90b88..e80f36e1a087542eb7d3ee0c06f5c493c7902d0c 100644 (file)
@@ -11,27 +11,37 @@ GETTER(float, instagib_respawntimejitter_ammo)
 
 #ifdef GAMEQC
 MODEL(VaporizerCells_ITEM, Item_Model("a_cells.md3"));
-SOUND(VaporizerCells, "misc/itempickup");
+SOUND(VaporizerCells, Item_Sound("itempickup"));
 #endif
 
+#ifdef SVQC
+int autocvar_g_instagib_ammo_drop;
+void ammo_vaporizercells_init(entity item)
+{
+    if(!item.ammo_cells)
+        item.ammo_cells = autocvar_g_instagib_ammo_drop;
+}
+#endif
 REGISTER_ITEM(VaporizerCells, Ammo) {
 #ifdef GAMEQC
     this.m_model                =   MDL_VaporizerCells_ITEM;
     this.m_sound                =   SND_VaporizerCells;
 #endif
+    this.netname                =   "minst_cells";
     this.m_name                 =   "Vaporizer Ammo";
     this.m_icon                 =   "ammo_supercells";
 #ifdef SVQC
-    this.m_botvalue             =   100;
+    this.m_botvalue             =   2000;
     this.m_itemid               =   IT_CELLS;
     this.m_respawntime          =   GET(instagib_respawntime_ammo);
     this.m_respawntimejitter    =   GET(instagib_respawntimejitter_ammo);
+    this.m_iteminit             =   ammo_vaporizercells_init;
 #endif
 }
 
 #ifdef GAMEQC
 MODEL(ExtraLife_ITEM, Item_Model("g_h100.md3"));
-SOUND(ExtraLife, "misc/megahealth");
+SOUND(ExtraLife, Item_Sound("megahealth"));
 #endif
 
 REGISTER_ITEM(ExtraLife, Powerup) {
@@ -39,6 +49,7 @@ REGISTER_ITEM(ExtraLife, Powerup) {
     this.m_model                =   MDL_ExtraLife_ITEM;
     this.m_sound                =   SND_ExtraLife;
 #endif
+    this.netname                =   "health_mega";
     this.m_name                 =   "Extra life";
     this.m_icon                 =   "item_mega_health";
     this.m_color                =   '1 0 0';
@@ -49,7 +60,7 @@ REGISTER_ITEM(ExtraLife, Powerup) {
 
 #ifdef GAMEQC
 MODEL(Invisibility_ITEM, Item_Model("g_strength.md3"));
-SOUND(Invisibility, "misc/powerup");
+SOUND(Invisibility, Item_Sound("powerup"));
 #endif
 
 REGISTER_ITEM(Invisibility, Powerup) {
@@ -57,6 +68,7 @@ REGISTER_ITEM(Invisibility, Powerup) {
     this.m_model            =   MDL_Invisibility_ITEM;
     this.m_sound            =   SND_Invisibility;
 #endif
+    this.netname            =   "strength";
     this.m_name             =   "Invisibility";
     this.m_icon             =   "strength";
     this.m_color            =   '0 0 1';
@@ -67,7 +79,7 @@ REGISTER_ITEM(Invisibility, Powerup) {
 
 #ifdef GAMEQC
 MODEL(Speed_ITEM, Item_Model("g_invincible.md3"));
-SOUND(Speed, "misc/powerup_shield");
+SOUND(Speed, Item_Sound("powerup_shield"));
 #endif
 
 REGISTER_ITEM(Speed, Powerup) {
@@ -75,6 +87,7 @@ REGISTER_ITEM(Speed, Powerup) {
     this.m_model            =   MDL_Speed_ITEM;
     this.m_sound            =   SND_Speed;
 #endif
+    this.netname            =   "invincible";
     this.m_name             =   "Speed";
     this.m_icon             =   "shield";
     this.m_color            =   '1 0 1';