Fix tunnel drawing (specially for desert eagle)
authorunc0rr
Tue, 01 Apr 2008 15:53:52 +0000
changeset 828 de0af1ad2610
parent 827 ee4fa9ff2a7b
child 829 1209eb768acf
Fix tunnel drawing (specially for desert eagle)
hedgewars/uLandGraphics.pas
--- a/hedgewars/uLandGraphics.pas	Sat Mar 29 21:13:54 2008 +0000
+++ b/hedgewars/uLandGraphics.pas	Tue Apr 01 15:53:52 2008 +0000
@@ -280,8 +280,8 @@
     ny:= ny + dX;
     end;
 
-t:= max(stY - HalfWidth * 2 - 4, 0);
-ty:= min(stY + HalfWidth * 2 + 4, 1023) - t;
+t:= max(stY - HalfWidth * 2 - 4 - abs(hwRound(dY * ticks)), 0);
+ty:= min(stY + HalfWidth * 2 + 4 + abs(hwRound(dY * ticks)), 1023) - t;
 UpdateLandTexture(t, ty)
 end;