From: terencehill Date: Sat, 10 Jul 2010 13:23:46 +0000 (+0200) Subject: Remove a wrong and never executed piece of code within minstagib_items. X-Git-Tag: xonotic-v0.1.0preview~454^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3466cc0e13455a448e4b63a56d1a25e716054264;p=xonotic%2Fxonotic-data.pk3dir.git Remove a wrong and never executed piece of code within minstagib_items. 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. --- diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 35e30f184..6eb73da43 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -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";