retain dx/dy from landgun
authornemo
Sun, 23 Oct 2011 01:47:44 -0400
changeset 6189 d0d666503fd5
parent 6188 e48280142001
child 6190 1db2486e45f4
retain dx/dy from landgun
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Sat Oct 22 20:49:26 2011 +0200
+++ b/hedgewars/uGears.pas	Sun Oct 23 01:47:44 2011 -0400
@@ -295,10 +295,13 @@
                     Pos:= 0;
                     Radius:= 1;
                     DirAngle:= random * 360;
-                    dx.isNegative:= GetRandom(2) = 0;
-                    dx.QWordValue:= GetRandom(100000000);
-                    dy.isNegative:= false;
-                    dy.QWordValue:= GetRandom(70000000);
+                    if State and gstTmpFlag = 0 then
+                        begin
+                        dx.isNegative:= GetRandom(2) = 0;
+                        dx.QWordValue:= GetRandom(100000000);
+                        dy.isNegative:= false;
+                        dy.QWordValue:= GetRandom(70000000)
+                        end;
                     State:= State or gstInvisible;
                     if GetRandom(2) = 0 then dx := -dx;
                     Health:= random(vobFrameTicks);