# HG changeset patch # User Wuzzy # Date 1593432499 -7200 # Node ID d738b2b1249e7c69e3815cb4f5b0e26c3317384d # Parent 3d8c2ab2b98b600797d59f09db3be0b8deb1c943 Fix cursor being too limited left/right if zoomed out too much diff -r 3d8c2ab2b98b -r d738b2b1249e hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Mon Jun 29 13:40:13 2020 +0200 +++ b/hedgewars/uWorld.pas Mon Jun 29 14:08:19 2020 +0200 @@ -2017,16 +2017,16 @@ if (CurrentTeam^.ExtDriven and isCursorVisible and autoCameraOn) or (not CurrentTeam^.ExtDriven and isCursorVisible) or ((FollowGear <> nil) and autoCameraOn) then begin - if CursorPoint.X < - cScreenWidth div 2 + EdgesDist then + if CursorPoint.X < - trunc(cScreenWidth / cScaleFactor) + EdgesDist then begin - WorldDx:= WorldDx - CursorPoint.X - cScreenWidth div 2 + EdgesDist; - CursorPoint.X:= - cScreenWidth div 2 + EdgesDist + WorldDx:= WorldDx - CursorPoint.X - trunc(cScreenWidth / cScaleFactor) + EdgesDist; + CursorPoint.X:= - trunc(cScreenWidth / cScaleFactor) + EdgesDist end else - if CursorPoint.X > cScreenWidth div 2 - EdgesDist then + if CursorPoint.X > trunc(cScreenWidth / cScaleFactor) - EdgesDist then begin - WorldDx:= WorldDx - CursorPoint.X + cScreenWidth div 2 - EdgesDist; - CursorPoint.X:= cScreenWidth div 2 - EdgesDist + WorldDx:= WorldDx - CursorPoint.X + trunc(cScreenWidth / cScaleFactor) - EdgesDist; + CursorPoint.X:= trunc(cScreenWidth / cScaleFactor) - EdgesDist end; shs:= min(cScreenHeight div 2 - trunc(cScreenHeight / cScaleFactor) + EdgesDist, cScreenHeight - EdgesDist);