scatter bottle pieces
authoralfadur
Sat, 25 May 2019 18:18:42 +0300
changeset 15056 a9873c81b5e6
parent 15055 ce3efc9cc6d3
child 15057 1a754860b0e5
scatter bottle pieces
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Sat May 25 02:14:25 2019 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Sat May 25 18:18:42 2019 +0300
@@ -709,17 +709,14 @@
         gY := hwRound(Gear^.Y);
         for i:= 0 to 4 do
             begin
-            glass:= AddVisualGear(gx+random(7)-3, gy+random(7)-3, vgtStraightShot);
+            glass:= AddVisualGear(gx+random(7)-3, gy+random(7)-3, vgtEgg);
             if glass <> nil then
                 with glass^ do
                     begin
                     Frame:= 2;
                     Tint:= $41B83ED0 - i * $10081000;
+                    dX:= dX + hwFloat2Float(Gear^.dX) / 2;
                     Angle:= random(360);
-                    dx:= 0.0000001;
-                    dy:= 0;
-                    if random(2) = 0 then
-                        dx := -dx;
                     FrameTicks:= 750;
                     State:= ord(sprEgg)
                     end;