hedgewars/uGears.pas
branchwebgl
changeset 8096 453917e94e55
parent 8026 4a4f21070479
parent 8030 165aeaaaf445
child 8099 a7f02b902b6f
--- a/hedgewars/uGears.pas	Wed Nov 14 00:23:29 2012 +0100
+++ b/hedgewars/uGears.pas	Thu Nov 22 00:41:53 2012 +0100
@@ -643,8 +643,7 @@
 
 if (GameFlags and gfArtillery) <> 0 then
     cArtillery:= true;
-
-for i:= GetRandom(10)+30 downto 0 do
+for i:= (LAND_WIDTH*LAND_HEIGHT) div 524288+2 downto 0 do
     begin
     rx:= GetRandom(rightX-leftX)+leftX;
     ry:= GetRandom(LAND_HEIGHT-topY)+topY;
@@ -932,7 +931,7 @@
 var GearsNearArray : TPGearArray;
 function GearsNear(X, Y: hwFloat; Kind: TGearType; r: LongInt): PGearArrayS;
 var
-    t  : PGear;
+    t: PGear;
     s: Longword;
 begin
     r:= r*r;
@@ -949,7 +948,7 @@
             GearsNearArray[s - 1] := t;
             end;
         t := t^.NextGear;
-	end;
+    end;
 
     GearsNear.size:= s;
     GearsNear.ar:= @GearsNearArray