# HG changeset patch
# User unc0rr
# Date 1303064196 -14400
# Node ID 9aa840fdf922be557edeecf8f167423151cb67a6
# Parent  73b3b4b8359ca3c480674bd964cc2b300d8f3a43
Try to allow cursor to reach water when zooming out

diff -r 73b3b4b8359c -r 9aa840fdf922 hedgewars/uWorld.pas
--- a/hedgewars/uWorld.pas	Sat Apr 16 23:21:15 2011 +0400
+++ b/hedgewars/uWorld.pas	Sun Apr 17 22:16:36 2011 +0400
@@ -1156,7 +1156,7 @@
 end;
 
 procedure MoveCamera;
-var EdgesDist,  wdy: LongInt;
+var EdgesDist, wdy, shs: LongInt;
     PrevSentPointTime: LongWord = 0;
 begin
 {$IFNDEF IPHONEOS}
@@ -1230,10 +1230,12 @@
             WorldDx:= WorldDx - CursorPoint.X + cScreenWidth div 2 - EdgesDist;
             CursorPoint.X:= cScreenWidth div 2 - EdgesDist
         end;
-    if CursorPoint.Y < EdgesDist then
+
+    shs:= cScreenHeight div 2 - trunc(cScreenHeight / cScaleFactor) + EdgesDist;
+    if CursorPoint.Y < shs then
     begin
-        WorldDy:= WorldDy + CursorPoint.Y - EdgesDist;
-        CursorPoint.Y:= EdgesDist
+        WorldDy:= WorldDy + CursorPoint.Y - shs;
+        CursorPoint.Y:= shs;
     end
     else
         if CursorPoint.Y > cScreenHeight - EdgesDist then