check for amNothing
authornemo
Tue, 20 Sep 2011 16:00:20 -0400
changeset 5974 5bd84514856f
parent 5973 94abd65e7d4f
child 5975 c3a8cab64fcb
check for amNothing
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);