--- 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);