hedgewars/uWorld.pas
changeset 3961 cf0ca1ff6c1a
parent 3890 e4b7b30232fd
child 3966 cbec77b5f706
--- a/hedgewars/uWorld.pas	Mon Oct 11 12:13:06 2010 -0400
+++ b/hedgewars/uWorld.pas	Mon Oct 11 12:37:42 2010 -0400
@@ -247,7 +247,7 @@
 for i:= 0 to cMaxSlotIndex do
     if ((i = 0) and (Ammo^[i, 1].Count > 0)) or ((i <> 0) and (Ammo^[i, 0].Count > 0)) then
         begin
-        if (cScreenHeight - CursorPoint.Y >= y) and (cScreenHeight - CursorPoint.Y < y + AMSlotSize) then Slot:= i;
+        if (cScreenHeight - CursorPoint.Y >= y) and (cScreenHeight - CursorPoint.Y <= y + AMSlotSize) then Slot:= i;
         inc(SlotsNum);
         DrawSprite(sprAMBorderVertical, x - BORDERSIZE, y, 0);
         t:= 0;
@@ -303,7 +303,7 @@
 for i:= cMaxSlotIndex downto 0 do
     if ((i = 0) and (Ammo^[i, 1].Count > 0)) or ((i <> 0) and (Ammo^[i, 0].Count > 0)) then
         begin
-        if (cScreenHeight - CursorPoint.Y >= y - AMSlotSize) and (cScreenHeight - CursorPoint.Y < y) then Slot:= i;
+        if (cScreenHeight - CursorPoint.Y >= y - AMSlotSize) and (cScreenHeight - CursorPoint.Y <= y) then Slot:= i;
         dec(y, AMSlotSize);
         inc(SlotsNum);
         DrawSprite(sprAMBorderVertical, x - BORDERSIZE, y, 0);