merge
authorunc0rr
Sat, 25 Jun 2011 16:40:29 +0400
changeset 5305 370989a1ddf0
parent 5302 eaa445230124 (diff)
parent 5303 e06bf3954a83 (current diff)
child 5307 dd53755e0fca
child 5308 c57a8878eebe
merge
--- a/hedgewars/uWorld.pas	Sat Jun 25 14:20:21 2011 +0200
+++ b/hedgewars/uWorld.pas	Sat Jun 25 16:40:29 2011 +0400
@@ -1227,14 +1227,14 @@
             CursorPoint.X:= cScreenWidth div 2 - EdgesDist
         end;
 
-    shs:= cScreenHeight div 2 - trunc(cScreenHeight / cScaleFactor) + EdgesDist;
+    shs:= min(cScreenHeight div 2 - trunc(cScreenHeight / cScaleFactor) + EdgesDist, cScreenHeight - EdgesDist);
     if CursorPoint.Y < shs then
     begin
         WorldDy:= WorldDy + CursorPoint.Y - shs;
         CursorPoint.Y:= shs;
     end
     else
-        if CursorPoint.Y > cScreenHeight - EdgesDist then
+        if (CursorPoint.Y > cScreenHeight - EdgesDist) then
         begin
            WorldDy:= WorldDy + CursorPoint.Y - cScreenHeight + EdgesDist;
            CursorPoint.Y:= cScreenHeight - EdgesDist