Renamed item_invincible to item_shield.
authorLyberta <lyberta@lyberta.net>
Mon, 16 Oct 2017 11:00:29 +0000 (14:00 +0300)
committerLyberta <lyberta@lyberta.net>
Mon, 16 Oct 2017 11:00:29 +0000 (14:00 +0300)
qcsrc/common/items/item/powerup.qh
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/mutators/mutator/instagib/sv_instagib.qc
qcsrc/common/mutators/mutator/overkill/sv_overkill.qc
qcsrc/common/mutators/mutator/random_items/sv_random_items.qc

index fa14bda..787a7c9 100644 (file)
@@ -66,7 +66,7 @@ void powerup_shield_init(entity item)
 }
 #endif
 REGISTER_ITEM(Shield, Powerup) {
-    this.m_canonical_spawnfunc = "item_invincible";
+    this.m_canonical_spawnfunc = "item_shield";
 #ifdef GAMEQC
     this.m_model            =   MDL_Shield_ITEM;
     this.m_sound            =   SND_Shield;
@@ -85,4 +85,5 @@ REGISTER_ITEM(Shield, Powerup) {
 #endif
 }
 
+SPAWNFUNC_ITEM(item_shield, ITEM_Shield)
 SPAWNFUNC_ITEM(item_invincible, ITEM_Shield)
index e039a96..6994c81 100644 (file)
@@ -750,7 +750,7 @@ MUTATOR_HOOKFUNCTION(buffs, OnEntityPreSpawn, CBC_ORDER_LAST)
        switch(ent.classname)
        {
                case "item_strength":
-               case "item_invincible":
+               case "item_shield":
                {
                        entity e = spawn();
                        buff_SpawnReplacement(e, ent);
index a81b4e7..c21623f 100644 (file)
@@ -512,7 +512,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, OnEntityPreSpawn)
        if (!autocvar_g_powerups) { return; }
        entity ent = M_ARGV(0, entity);
        // Can't use .itemdef here
-       if (!(ent.classname == "item_strength" || ent.classname == "item_invincible" || ent.classname == "item_health_mega"))
+       if (!(ent.classname == "item_strength" || ent.classname == "item_shield" || ent.classname == "item_health_mega"))
                return;
 
        entity e = spawn();
index 6b32ec3..120fabe 100644 (file)
@@ -193,7 +193,7 @@ MUTATOR_HOOKFUNCTION(ok, OnEntityPreSpawn)
                        wep.nextthink = time + 0.1;
                        return true;
                }
-               else if(ent.classname == "item_invincible")
+               else if(ent.classname == "item_shield")
                {
                        entity wep = new(weapon_rpc);
                        setorigin(wep, ent.origin);
index 0c86c72..ad0d49c 100644 (file)
@@ -112,7 +112,7 @@ string RandomItems_GetItemVarName(string class_name)
                X(item_fuel);
 
                X(item_strength);
-               case "item_invincible" : return "item_shield";
+               X(item_shield);
                X(item_fuel_regen);
                X(item_jetpack);
 
@@ -272,7 +272,7 @@ string RandomItems_GetRandomMapItemClassName()
                                        1 \
                                )
                        X("item_strength");
-                       X("item_invincible");
+                       X("item_shield");
                        X("item_fuel_regen");
                        X("item_jetpack");
                        #undef X
@@ -497,7 +497,7 @@ string RandomItems_GetRandomLootItemClassName()
                                        1 \
                                )
                        X("item_strength");
-                       X("item_invincible");
+                       X("item_shield");
                        X("item_jetpack");
                        X("item_fuel_regen");
                        #undef X