if(wa & j)
{
ammofield = Item_CounterField(j);
- wep.ammofield = 0;
// if our weapon is loaded, give its load back to the player
if(self.(weapon_load[self.weapon]) > 0)
own.ammofield += self.(weapon_load[self.weapon]);
self.(weapon_load[self.weapon]) = -1; // schedule the weapon for reloading
}
+
+ wep.ammofield = 0;
}
}
}
if(wa & j)
{
ammofield = Item_CounterField(j);
- thisammo = min(own.ammofield, wep.ammofield);
- wep.ammofield = thisammo;
- own.ammofield -= thisammo;
- s = strcat(s, " and ", ftos(thisammo), " ", Item_CounterFieldName(j));
// if our weapon is loaded, give its load back to the player
if(self.(weapon_load[self.weapon]) > 0)
own.ammofield += self.(weapon_load[self.weapon]);
self.(weapon_load[self.weapon]) = -1; // schedule the weapon for reloading
}
+
+ thisammo = min(own.ammofield, wep.ammofield);
+ wep.ammofield = thisammo;
+ own.ammofield -= thisammo;
+ s = strcat(s, " and ", ftos(thisammo), " ", Item_CounterFieldName(j));
}
}
s = substring(s, 5, -1);
if (item.weapons & WEPBIT_MINSTANEX)
W_GiveWeapon (player, WEP_MINSTANEX, item.netname);
- if (item.ammo_cells)
- player.ammo_cells = bound(player.ammo_cells, 999, player.ammo_cells + autocvar_g_minstagib_ammo_drop);
player.health = 100;
}
if(self.team)
f |= FL_NO_WEAPON_STAY;
+ // stupid minstagib hack, don't ask
+ if(g_minstagib)
+ if(self.ammo_cells)
+ self.ammo_cells = autocvar_g_minstagib_ammo_drop;
+
StartItem(e.model, "weapons/weaponpickup.wav", self.respawntime, self.respawntimejitter, e.message, 0, e.weapons, f, weapon_pickupevalfunc, e.bot_pickupbasevalue);
if (self.modelindex) // don't precache if self was removed
weapon_action(e.weapon, WR_PRECACHE);