hedgewars/uWorld.pas
changeset 2359 76d853f22afa
parent 2357 babe1a55e284
child 2360 d4d545da9dbe
--- a/hedgewars/uWorld.pas	Tue Sep 08 19:47:45 2009 +0000
+++ b/hedgewars/uWorld.pas	Tue Sep 08 21:58:09 2009 +0000
@@ -123,7 +123,7 @@
 	dec(y, 33);
 	DrawSprite(sprAMSlotName, x, y, 0);
 	for i:= cMaxSlotIndex downto 0 do
-		if (Ammo^[i, 0].Count > 0) and (Ammo^[i, 0].AmmoType <> amNothing) then
+		if (Ammo^[i, 0].Count > 0) then
 			begin
 			if (cScreenHeight - CursorPoint.Y >= y - 33) and (cScreenHeight - CursorPoint.Y < y) then Slot:= i;
 			dec(y, 33);
@@ -131,7 +131,7 @@
 			DrawSprite(sprAMSlot, x, y, 0);
 			DrawSprite(sprAMSlotKeys, x + 2, y + 1, i);
 			t:= 0;
-			while (t <= cMaxSlotAmmoIndex) and (Ammo^[i, t].Count > 0) do
+			while (t <= cMaxSlotAmmoIndex) and (Ammo^[i, t].Count > 0) and (Ammo^[i, t].AmmoType <> amNothing) do
 				begin
 				l:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber;