--- a/hedgewars/uGearsHedgehog.pas Sat Jul 05 18:51:45 2014 +0200
+++ b/hedgewars/uGearsHedgehog.pas Sat Jul 05 20:15:56 2014 +0200
@@ -423,7 +423,7 @@
newGear^.dY:= newDY / newGear^.Density
end;
if (CurAmmoGear <> nil) and (CurAmmoGear^.AmmoType = amJetpack) and
- (Gear^.Message and gmPrecise <> 0) and (hwRound(Y) > cWaterLine) then
+ (Gear^.Message and gmPrecise <> 0) and CheckCoordInWater(hwRound(X), hwRound(Y)) then
newGear^.State:= newGear^.State or gstSubmersible;
case CurAmmoType of
@@ -548,7 +548,7 @@
begin
if TagTurnTimeLeft = 0 then
TagTurnTimeLeft:= TurnTimeLeft;
- if (CurAmmoGear <> nil) and (CurAmmoGear^.State and gstSubmersible <> 0) and (hwRound(CurAmmoGear^.Y) > cWaterLine) then
+ if (CurAmmoGear <> nil) and (CurAmmoGear^.State and gstSubmersible <> 0) and CheckCoordInWater(hwRound(CurAmmoGear^.X), hwRound(CurAmmoGear^.Y)) then
TurnTimeLeft:=(Ammoz[a].TimeAfterTurn * cGetAwayTime) div 25
else TurnTimeLeft:=(Ammoz[a].TimeAfterTurn * cGetAwayTime) div 100;
end;
@@ -864,7 +864,7 @@
land: Word;
begin
land:= 0;
-isUnderwater:= cWaterLine < hwRound(Gear^.Y) + Gear^.Radius;
+isUnderwater:= CheckCoordInWater(hwRound(Gear^.X), hwRound(Gear^.Y) + Gear^.Radius);
if Gear^.dX.QWordValue > 8160437862 then
Gear^.dX.QWordValue:= 8160437862;
if Gear^.dY.QWordValue > 8160437862 then