hedgewars/uGears.pas
changeset 3407 dcc129c4352e
parent 3405 8fdb08497bf1
child 3415 1ca22b3493e9
--- a/hedgewars/uGears.pas	Sun May 02 20:30:23 2010 +0000
+++ b/hedgewars/uGears.pas	Sun May 02 22:00:50 2010 +0000
@@ -1607,10 +1607,7 @@
     repeat
         inc(x, Delta);
         cnt:= 0;
-        if topY > 1024 then
-            y:= 1024-Gear^.Radius * 2
-        else
-            y:= topY-Gear^.Radius * 2;
+        y:= min(1024, topY) - 2 * Gear^.Radius;
         while y < LAND_HEIGHT do
             begin
             repeat