# HG changeset patch # User nemo # Date 1286815062 14400 # Node ID cf0ca1ff6c1a346a2a011568e65ffdc06b64904a # Parent ada50f8d4186d9efcc25420ba419dd92ef3e6024 Constrain to <= to avoid a bug on bottom edge reported by Henek diff -r ada50f8d4186 -r cf0ca1ff6c1a hedgewars/uWorld.pas --- 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);