hedgewars/GSHandlers.inc
changeset 919 fadfefc2ae40
parent 915 33040b7695c0
child 924 227f9fcdc2f4
--- a/hedgewars/GSHandlers.inc	Thu May 08 20:54:04 2008 +0000
+++ b/hedgewars/GSHandlers.inc	Thu May 08 21:27:59 2008 +0000
@@ -111,6 +111,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepBomb(Gear: PGear);
 var i: LongInt;
+    dX, dY: hwFloat;
 begin
 AllInactive:= false;
 doStepFallingGear(Gear);
@@ -122,7 +123,11 @@
       gtClusterBomb: begin
                      doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, EXPLAutoSound);
                      for i:= 0 to 4 do
-                         AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtCluster, 0, rndSign(GetRandom * _0_1), (GetRandom - _3) * _0_08, 0);
+                         begin
+                         dX:= rndSign(GetRandom * _0_1);
+                         dY:= (GetRandom - _3) * _0_08;
+                         AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtCluster, 0, dX, dY, 0);
+                         end
                      end
         end;
    DeleteGear(Gear);