From 4f255a26523ff9921547a519853d8081746633ad Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 5 May 2012 14:23:00 +0000 Subject: [PATCH] - fixed: Weapons that were dehacked to use no ammo did not work anymore. SVN r3622 (trunk) --- src/g_shared/a_weapons.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/g_shared/a_weapons.cpp b/src/g_shared/a_weapons.cpp index c056993aa..8f45d892a 100644 --- a/src/g_shared/a_weapons.cpp +++ b/src/g_shared/a_weapons.cpp @@ -461,7 +461,11 @@ bool AWeapon::CheckAmmo (int fireMode, bool autoSwitch, bool requireAmmo, int am count1 = (Ammo1 != NULL) ? Ammo1->Amount : 0; count2 = (Ammo2 != NULL) ? Ammo2->Amount : 0; - if (ammocount >= 0 && (WeaponFlags & WIF_DEHAMMO)) + if ((WeaponFlags & WIF_DEHAMMO) && (Ammo1 == NULL)) + { + lAmmoUse1 = 0; + } + else if (ammocount >= 0 && (WeaponFlags & WIF_DEHAMMO)) { lAmmoUse1 = ammocount; }