Fix the weapon stay bug
[voretournament/voretournament.git] / data / qcsrc / server / t_items.qc
index 18c74be311d08a2ca7561c5345dcda9c0ba9ea0a..db0e5a6215a13ebd009067e0f8eced54c917e9cb 100644 (file)
@@ -814,6 +814,13 @@ void weapon_defaultspawnfunc(float wpn)
        if(self.team)\r
                self.flags |= FL_NO_WEAPON_STAY;\r
 \r
+       if(g_weapon_stay == 2 && self.classname != "droppedweapon")\r
+       {\r
+               self.ammo_fuel = 0;\r
+               // weapon stay 2: don't use ammo on weapon pickups; instead\r
+               // initialize all ammo types to the pickup ammo unless set by g_start_ammo_*\r
+       }\r
+\r
        StartItem(e.model, "weapons/weaponpickup.wav", self.respawntime, self.respawntimejitter, e.message, 0, e.weapons, FL_WEAPON, weapon_pickupevalfunc, e.bot_pickupbasevalue);\r
        if (self.modelindex) // don't precache if self was removed\r
                weapon_action(e.weapon, WR_PRECACHE);\r