hedgewars/GSHandlers.inc
changeset 7296 fb5b7cb58a67
parent 7293 468cf6d561e5
child 7305 b242e91a92a9
--- a/hedgewars/GSHandlers.inc	Tue Jun 26 10:14:40 2012 -0400
+++ b/hedgewars/GSHandlers.inc	Tue Jun 26 11:08:33 2012 -0400
@@ -3437,7 +3437,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepBallgunWork(Gear: PGear);
 var 
-    HHGear: PGear;
+    HHGear, ball: PGear;
     rx, ry: hwFloat;
     gX, gY: LongInt;
 begin
@@ -3452,7 +3452,8 @@
         rx := rndSign(getRandomf * _0_1);
         ry := rndSign(getRandomf * _0_1);
 
-        AddGear(gx, gy, gtBall, 0, SignAs(AngleSin(HHGear^.Angle) * _0_8, HHGear^.dX) + rx, AngleCos(HHGear^.Angle) * ( - _0_8) + ry, 0);
+        ball:= AddGear(gx, gy, gtBall, 0, SignAs(AngleSin(HHGear^.Angle) * _0_8, HHGear^.dX) + rx, AngleCos(HHGear^.Angle) * ( - _0_8) + ry, 0);
+        ball^.CollisionMask:= $FF7F;
 
         PlaySound(sndGun);
         end;