hedgewars/uGearsUtils.pas
changeset 8992 5b0be812dcdb
parent 8991 82e3a6e5d51b
child 9071 df85fad2c7f7
--- a/hedgewars/uGearsUtils.pas	Tue May 14 07:16:14 2013 -0400
+++ b/hedgewars/uGearsUtils.pas	Tue May 14 08:57:30 2013 -0400
@@ -361,7 +361,7 @@
             else DeleteGear(Gear);
             exit
             end;
-        isSubmersible:= ((Gear = CurrentHedgehog^.Gear) and (CurAmmoGear <> nil) and (CurAmmoGear^.AmmoType = amJetpack)) or (Gear^.State and gstNoDrown <> 0);
+        isSubmersible:= ((Gear = CurrentHedgehog^.Gear) and (CurAmmoGear <> nil) and (CurAmmoGear^.State and gstSubmersible <> 0)) or (Gear^.State and gstSubmersible <> 0);
         skipSpeed := _0_25;
         skipAngle := _1_9;
         skipDecay := _0_87;
@@ -408,7 +408,7 @@
                             exit // skip splashes 
                 end
             else if (Y > cWaterLine + cVisibleWater*4) and 
-                    ((Gear <> CurrentHedgehog^.Gear) or (CurAmmoGear = nil) or (CurAmmoGear^.AmmoType <> amJetpack)) then
+                    ((Gear <> CurrentHedgehog^.Gear) or (CurAmmoGear = nil) or (CurAmmoGear^.State and gstSubmersible = 0)) then
                 Gear^.doStep:= @doStepDrowningGear;
             if ((not isSubmersible) and (Y < cWaterLine + 64 + Gear^.Radius))
             or (isSubmersible and (Y < cWaterLine + 2 + Gear^.Radius) and (Gear = CurAmmoGear) and ((CurAmmoGear^.Pos = 0)