A_FireCustomMissile's useammo parameter should NOT use ammo if not called from a weapon

This commit is contained in:
Kyle Evans 2015-03-10 11:58:10 -04:00 committed by Randy Heit
parent 4f04fb4fbd
commit bc206f21af

View file

@ -1337,7 +1337,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireCustomMissile)
AWeapon * weapon=player->ReadyWeapon;
AActor *linetarget;
if (UseAmmo && weapon)
// Only use ammo if called from a weapon
if (UseAmmo && ACTION_CALL_FROM_WEAPON() && weapon)
{
if (!weapon->DepleteAmmo(weapon->bAltFire, true)) return; // out of ammo
}