Remove a wrong and never executed piece of code within minstagib_items.
authorterencehill <piuntn@gmail.com>
Sat, 10 Jul 2010 13:23:46 +0000 (15:23 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 10 Jul 2010 13:23:46 +0000 (15:23 +0200)
Reason: the function minstagib_items is intended to be called (and it's called I've verified) only on spawned items loading the map, never on dropped weapons.
If it wasn't so, that code would have spawned WRONGLY a nex instead of a minstanex (there is a typo).
The code that does correctly the job obviously exists and can be found in the function Item_GiveTo.

qcsrc/server/t_items.qc

index 35e30f1849fe25239aa5831dbcf6de316aa5ac59..6eb73da43e4f2986db8f11117a293a868cd02358 100644 (file)
@@ -891,16 +891,6 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
  */
 void minstagib_items (float itemid)
 {
-       // we don't want to replace dropped weapons ;)
-       if (self.classname == "droppedweapon")
-       {
-               self.ammo_cells = 25;
-               StartItem ("models/weapons/g_nex.md3",
-                       "weapons/weaponpickup.wav", 15, 0,
-                       "MinstaNex", 0, WEPBIT_MINSTANEX, FL_WEAPON, generic_pickupevalfunc, 1000);
-               return;
-       }
-
        local float rnd;
        self.classname = "minstagib";