hedgewars/uGears.pas
changeset 15169 f532203c5ceb
parent 15159 fcd697bce2a8
child 15170 3cc1a79de3fd
--- a/hedgewars/uGears.pas	Mon Jun 17 19:33:43 2019 +0200
+++ b/hedgewars/uGears.pas	Mon Jun 17 19:51:05 2019 +0200
@@ -1064,7 +1064,7 @@
                     y:= hwRound(Gear^.Y) - SpritesData[sprTargetBee].Height div 2;
                     // Calculate offset from map boundaries and border
                     if hasBorder then
-                        x:= max(min(x, RightX - SpritesData[sprTargetBee].Width) - cBorderWidth, LeftX + cBorderWidth)
+                        x:= max(min(x, RightX - SpritesData[sprTargetBee].Width - cBorderWidth), LeftX + cBorderWidth)
                     else
                         x:= max(min(x, RightX - SpritesData[sprTargetBee].Width), LeftX);
                     y:= max(y, TopY);