# HG changeset patch # User nemo # Date 1316548820 14400 # Node ID 5bd84514856f3f2a1d540c3907acb197bb239492 # Parent 94abd65e7d4f30235e8d4e27f2f67cb484a1eeaf check for amNothing diff -r 94abd65e7d4f -r 5bd84514856f hedgewars/uAmmos.pas --- a/hedgewars/uAmmos.pas Tue Sep 20 13:37:52 2011 -0400 +++ b/hedgewars/uAmmos.pas Tue Sep 20 16:00:20 2011 -0400 @@ -339,7 +339,8 @@ CurWeapon:= GetAmmoEntry(Hedgehog); if (CurWeapon^.Count = 0) then - SwitchToFirstLegalAmmo(Hedgehog); + SwitchToFirstLegalAmmo(Hedgehog) + else if CurWeapon^.AmmoType = amNothing then Hedgehog.CurAmmoType:= amNothing; CurWeapon:= GetAmmoEntry(Hedgehog);