Allow dropping the machine gun

This commit is contained in:
2025-07-15 18:33:43 -03:00
parent ed86d86c89
commit 505f85ee90

View File

@@ -121,7 +121,7 @@ void TossClientItems( gentity_t *self ) {
// weapon that isn't the mg or gauntlet. Without this, a client
// can pick up a weapon, be killed, and not drop the weapon because
// their weapon change hasn't completed yet and they are still holding the MG.
if ( weapon == WP_MACHINEGUN || weapon == WP_GRAPPLING_HOOK ) {
if ( weapon == WP_GRAPPLING_HOOK ) {
if ( self->client->ps.weaponstate == WEAPON_DROPPING ) {
weapon = self->client->pers.cmd.weapon;
}
@@ -134,7 +134,7 @@ void TossClientItems( gentity_t *self ) {
//Nothing!
}
else
if ( weapon > WP_MACHINEGUN && weapon != WP_GRAPPLING_HOOK &&
if ( weapon >= WP_MACHINEGUN && weapon != WP_GRAPPLING_HOOK &&
self->client->ps.ammo[ weapon ] ) {
// find the item type for this weapon
item = BG_FindItemForWeapon( weapon );