# HG changeset patch # User unc0rr # Date 1309005629 -14400 # Node ID 370989a1ddf021a0f001ade8ceb44012a10c0c8a # Parent eaa445230124eb1383ab6b7c9bb8985ee1abfaca# Parent e06bf3954a8358e18253dcb8fe2ae3109039ea12 merge diff -r e06bf3954a83 -r 370989a1ddf0 hedgewars/uWorld.pas --- 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