hedgewars/uWorld.pas
changeset 2378 66fcb4d62a53
parent 2376 ece7b87f1334
child 2379 d62b1f224982
--- a/hedgewars/uWorld.pas	Thu Sep 10 15:30:11 2009 +0000
+++ b/hedgewars/uWorld.pas	Thu Sep 10 15:35:34 2009 +0000
@@ -195,10 +195,10 @@
 WaterColorArray[3].a := Alpha;
 
 lw:= cScreenWidth / cScaleFactor;
-lh:= cScreenHeight * 2 / cScaleFactor;
+lh:= trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 + 16;
 // Water
-r.y:= WorldDy + cWaterLine + 16;
-if r.y < cScreenHeight * 2 / cScaleFactor then
+r.y:= WorldDy + cWaterLine;
+if WorldDy < trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 - cWaterLine then
 	begin
 	if r.y < 0 then r.y:= 0;