mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
A_FireCustomMissile's useammo parameter should NOT use ammo if not called from a weapon
This commit is contained in:
parent
4f04fb4fbd
commit
bc206f21af
1 changed files with 3 additions and 2 deletions
|
@ -1337,7 +1337,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireCustomMissile)
|
||||||
AWeapon * weapon=player->ReadyWeapon;
|
AWeapon * weapon=player->ReadyWeapon;
|
||||||
AActor *linetarget;
|
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
|
if (!weapon->DepleteAmmo(weapon->bAltFire, true)) return; // out of ammo
|
||||||
}
|
}
|
||||||
|
@ -5892,4 +5893,4 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetRipMax)
|
||||||
ACTION_PARAM_START(1);
|
ACTION_PARAM_START(1);
|
||||||
ACTION_PARAM_INT(max, 1);
|
ACTION_PARAM_INT(max, 1);
|
||||||
self->RipLevelMax = max;
|
self->RipLevelMax = max;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue