hedgewars/uGearsUtils.pas
changeset 7406 1fe2c821f9bf
parent 7389 15c3fb4882df
child 7420 77567b03cc28
--- a/hedgewars/uGearsUtils.pas	Fri Jul 20 18:42:45 2012 +0400
+++ b/hedgewars/uGearsUtils.pas	Fri Jul 20 14:16:05 2012 -0400
@@ -345,7 +345,14 @@
         begin
         if Gear^.State and gstInvisible <> 0 then
             begin
-            DeleteGear(Gear);
+            if Gear^.Kind = gtGenericFaller then
+                begin
+                Gear^.X:= int2hwFloat(GetRandom(rightX-leftX)+leftX);
+                Gear^.Y:= int2hwFloat(GetRandom(LAND_HEIGHT-topY)+topY);
+                Gear^.dX:= _90-(GetRandomf*_360);
+                Gear^.dY:= _90-(GetRandomf*_360)
+                end
+            else DeleteGear(Gear);
             exit
             end;
         isSubmersible:= (Gear = CurrentHedgehog^.Gear) and (CurAmmoGear <> nil) and (CurAmmoGear^.AmmoType = amJetpack);