# HG changeset patch # User unc0rr # Date 1252596934 0 # Node ID 66fcb4d62a53b7787dc08f644ebbb0d596108e8d # Parent f3fab2b09e0cfdb18a06d71af2f178a27ec96df9 Fix water rendering issues diff -r f3fab2b09e0c -r 66fcb4d62a53 hedgewars/uWorld.pas --- 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;