- fixed: Weapons that were dehacked to use no ammo did not work anymore.

SVN r3622 (trunk)
This commit is contained in:
Christoph Oelckers 2012-05-05 14:23:00 +00:00
parent 7eb8594e86
commit 4f255a2652

View file

@ -461,7 +461,11 @@ bool AWeapon::CheckAmmo (int fireMode, bool autoSwitch, bool requireAmmo, int am
count1 = (Ammo1 != NULL) ? Ammo1->Amount : 0; count1 = (Ammo1 != NULL) ? Ammo1->Amount : 0;
count2 = (Ammo2 != NULL) ? Ammo2->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; lAmmoUse1 = ammocount;
} }