hedgewars/uGearsUtils.pas
changeset 7389 15c3fb4882df
parent 7372 fcc002658832
child 7406 1fe2c821f9bf
--- a/hedgewars/uGearsUtils.pas	Fri Jul 13 13:21:52 2012 +0400
+++ b/hedgewars/uGearsUtils.pas	Sat Jul 14 23:19:09 2012 -0400
@@ -343,6 +343,11 @@
     Y:= hwRound(Gear^.Y);
     if cWaterLine < Y + Gear^.Radius then
         begin
+        if Gear^.State and gstInvisible <> 0 then
+            begin
+            DeleteGear(Gear);
+            exit
+            end;
         isSubmersible:= (Gear = CurrentHedgehog^.Gear) and (CurAmmoGear <> nil) and (CurAmmoGear^.AmmoType = amJetpack);
         skipSpeed := _0_25;
         skipAngle := _1_9;