hedgewars/uGearsList.pas
changeset 10354 56bd029245fc
parent 10127 7f29a65aa1e4
child 10490 b30b8d39d662
--- a/hedgewars/uGearsList.pas	Sat Jul 05 18:51:45 2014 +0200
+++ b/hedgewars/uGearsList.pas	Sat Jul 05 20:15:56 2014 +0200
@@ -649,12 +649,11 @@
         begin
         if (Gear <> CurrentHedgehog^.Gear) or (CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtKamikaze) then
             Gear^.Hedgehog^.Team^.Clan^.Flawless:= false;
-        if (hwRound(Gear^.Y) >= cWaterLine) then
+        if CheckCoordInWater(hwRound(Gear^.X), hwRound(Gear^.Y)) then
             begin
             t:= max(Gear^.Damage, Gear^.Health);
             Gear^.Damage:= t;
-            if (((not SuddenDeathDmg) and (WaterOpacity < $FF)) or (SuddenDeathDmg and (WaterOpacity < $FF)))
-            and (hwRound(Gear^.Y) < cWaterLine + 256) then
+            if (((not SuddenDeathDmg) and (WaterOpacity < $FF)) or (SuddenDeathDmg and (SDWaterOpacity < $FF))) then
                 spawnHealthTagForHH(Gear, t);
             end;