For sanity, give items an identifier name (like all other registries)
authorMario <mario@smbclan.net>
Wed, 15 Feb 2017 00:57:06 +0000 (10:57 +1000)
committerMario <mario@smbclan.net>
Wed, 15 Feb 2017 00:57:06 +0000 (10:57 +1000)
qcsrc/common/items/item/ammo.qh
qcsrc/common/items/item/armor.qh
qcsrc/common/items/item/health.qh
qcsrc/common/items/item/jetpack.qh
qcsrc/common/items/item/pickup.qh
qcsrc/common/items/item/powerup.qh
qcsrc/common/mutators/mutator/instagib/items.qh

index 15d8e39..2096392 100644 (file)
@@ -34,6 +34,7 @@ REGISTER_ITEM(Bullets, Ammo) {
 #ifdef GAMEQC
     this.m_model    =   MDL_Bullets_ITEM;
 #endif
+    this.netname    =   "bullets";
     this.m_name     =   "bullets";
     this.m_icon     =   "ammo_bullets";
 #ifdef SVQC
@@ -59,6 +60,7 @@ REGISTER_ITEM(Cells, Ammo) {
 #ifdef GAMEQC
     this.m_model    =   MDL_Cells_ITEM;
 #endif
+    this.netname    =   "cells";
     this.m_name     =   "cells";
     this.m_icon     =   "ammo_cells";
 #ifdef SVQC
@@ -84,6 +86,7 @@ REGISTER_ITEM(Plasma, Ammo) {
 #ifdef GAMEQC
     this.m_model    =   MDL_Plasma_ITEM;
 #endif
+    this.netname    =   "plasma";
     this.m_name     =   "plasma";
     this.m_icon     =   "ammo_plasma";
 #ifdef SVQC
@@ -109,6 +112,7 @@ REGISTER_ITEM(Rockets, Ammo) {
 #ifdef GAMEQC
     this.m_model    =   MDL_Rockets_ITEM;
 #endif
+    this.netname    =   "rockets";
     this.m_name     =   "rockets";
     this.m_icon     =   "ammo_rockets";
 #ifdef SVQC
@@ -134,6 +138,7 @@ REGISTER_ITEM(Shells, Ammo) {
 #ifdef GAMEQC
     this.m_model    =   MDL_Shells_ITEM;
 #endif
+    this.netname    =   "shells";
     this.m_name     =   "shells";
     this.m_icon     =   "ammo_shells";
 #ifdef SVQC
index 6f9c538..81d05ad 100644 (file)
@@ -36,6 +36,7 @@ REGISTER_ITEM(ArmorSmall, Armor) {
     this.m_model                =   MDL_ArmorSmall_ITEM;
     this.m_sound                =   SND_ArmorSmall;
 #endif
+    this.netname                =   "armor_small";
     this.m_name                 =   "5 Armor";
     this.m_icon                 =   "armor";
 #ifdef SVQC
@@ -69,6 +70,7 @@ REGISTER_ITEM(ArmorMedium, Armor) {
     this.m_model                =   MDL_ArmorMedium_ITEM;
     this.m_sound                =   SND_ArmorMedium;
 #endif
+    this.netname                =   "armor_medium";
     this.m_name                 =   "25 Armor";
     this.m_icon                 =   "armor";
 #ifdef SVQC
@@ -102,6 +104,7 @@ REGISTER_ITEM(ArmorBig, Armor) {
     this.m_model                =   MDL_ArmorBig_ITEM;
     this.m_sound                =   SND_ArmorBig;
 #endif
+    this.netname                =   "armor_big";
     this.m_name                 =   "50 Armor";
     this.m_icon                 =   "armor";
     this.m_color                =   '0 1 0';
@@ -137,6 +140,7 @@ REGISTER_ITEM(ArmorMega, Armor) {
     this.m_model                =   MDL_ArmorMega_ITEM;
     this.m_sound                =   SND_ArmorMega;
 #endif
+    this.netname                =   "armor_mega";
     this.m_name                 =   "100 Armor";
     this.m_icon                 =   "item_large_armor";
     this.m_color                =   '0 1 0';
index 01a2924..5a45251 100644 (file)
@@ -36,6 +36,7 @@ REGISTER_ITEM(HealthSmall, Health) {
     this.m_model                =   MDL_HealthSmall_ITEM;
     this.m_sound                =   SND_HealthSmall;
 #endif
+    this.netname                =   "health_small";
     this.m_name                 =   "5 Health";
     this.m_icon                 =   "health";
 #ifdef SVQC
@@ -69,6 +70,7 @@ REGISTER_ITEM(HealthMedium, Health) {
     this.m_model                =   MDL_HealthMedium_ITEM;
     this.m_sound                =   SND_HealthMedium;
 #endif
+    this.netname                =   "health_medium";
     this.m_name                 =   "25 Health";
     this.m_icon                 =   "health";
 #ifdef SVQC
@@ -102,6 +104,7 @@ REGISTER_ITEM(HealthBig, Health) {
     this.m_model                =   MDL_HealthBig_ITEM;
     this.m_sound                =   SND_HealthBig;
 #endif
+    this.netname                =   "health_big";
     this.m_name                 =   "50 Health";
     this.m_icon                 =   "health";
     this.m_color                =   '1 0 0';
@@ -137,6 +140,7 @@ REGISTER_ITEM(HealthMega, Health) {
     this.m_model                =   MDL_HealthMega_ITEM;
     this.m_sound                =   SND_HealthMega;
 #endif
+    this.netname                =   "health_mega";
     this.m_name                 =   "100 Health";
     this.m_icon                 =   "item_mega_health";
     this.m_color                =   '1 0 0';
index 430161d..a6d1c8d 100644 (file)
@@ -28,6 +28,7 @@ REGISTER_ITEM(Jetpack, Powerup) {
     this.m_model                =   MDL_Jetpack_ITEM;
     this.m_itemid               =   IT_JETPACK;
 #endif
+    this.netname                =   "jetpack";
     this.m_name                 =   "Jet pack";
     this.m_icon                 =   "jetpack";
     this.m_color                =   '0.5 0.5 0.5';
@@ -56,6 +57,7 @@ REGISTER_ITEM(JetpackFuel, Ammo) {
 #ifdef GAMEQC
     this.m_model    =   MDL_JetpackFuel_ITEM;
 #endif
+    this.netname    =   "fuel";
     this.m_name     =   "Fuel";
     this.m_icon     =   "ammo_fuel";
 #ifdef SVQC
@@ -73,6 +75,7 @@ REGISTER_ITEM(JetpackRegen, Powerup) {
 #ifdef GAMEQC
     this.m_model                =   MDL_JetpackRegen_ITEM;
 #endif
+    this.netname                =   "fuel_regen";
     this.m_name                 =   "Fuel regenerator";
     this.m_icon                 =   "fuelregen";
     this.m_color                =   '1 0.5 0';
index d029ca5..dccd368 100644 (file)
@@ -26,6 +26,7 @@ CLASS(Pickup, GameItem)
     ATTRIB(Pickup, m_model, Model);
     ATTRIB(Pickup, m_sound, Sound, SND_ITEMPICKUP);
 #endif
+    ATTRIB(Pickup, netname, string);
     ATTRIB(Pickup, m_name, string);
     METHOD(Pickup, show, void(Pickup this))
     {
index ef0d223..41b658c 100644 (file)
@@ -37,6 +37,7 @@ REGISTER_ITEM(Strength, Powerup) {
     this.m_glow             =   true;
     this.m_respawnsound     =   SND_STRENGTH_RESPAWN;
 #endif
+    this.netname            =   "strength";
     this.m_name             =   "Strength Powerup";
     this.m_icon             =   "strength";
     this.m_color            =   '0 0 1';
@@ -68,6 +69,7 @@ REGISTER_ITEM(Shield, Powerup) {
     this.m_glow             =   true;
     this.m_respawnsound     =   SND_SHIELD_RESPAWN;
 #endif
+    this.netname            =   "invincible";
     this.m_name             =   "Shield";
     this.m_icon             =   "shield";
     this.m_color            =   '1 0 1';
index 1851f1b..e80f36e 100644 (file)
@@ -27,6 +27,7 @@ REGISTER_ITEM(VaporizerCells, Ammo) {
     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
@@ -48,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';
@@ -66,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';
@@ -84,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';