hedgewars/uGearsUtils.pas
changeset 7492 3188794b9d87
parent 7420 77567b03cc28
child 7509 76e3a3fc17cd
--- a/hedgewars/uGearsUtils.pas	Sat Aug 04 22:26:51 2012 -0400
+++ b/hedgewars/uGearsUtils.pas	Sat Aug 04 22:51:41 2012 -0400
@@ -510,7 +510,7 @@
     count: LongInt = 0;
 begin
     if (y and LAND_HEIGHT_MASK) = 0 then
-        for i:= max(x - r, 0) to min(x + r, LAND_WIDTH - 4) do
+        for i:= min(x + r, LAND_WIDTH - 4) downto max(x - r, 0) do 
             if Land[y, i] and mask <> 0 then
             begin
                 inc(count);