Air attack: Replace smoke with bubbles when underwater
authorWuzzy <Wuzzy2@mail.ru>
Thu, 11 Jul 2019 05:07:55 +0200
changeset 15233 1dd99fc2a0e8
parent 15232 263b9850c16d
child 15234 b96868956514
Air attack: Replace smoke with bubbles when underwater
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Thu Jul 11 04:42:50 2019 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Thu Jul 11 05:07:55 2019 +0200
@@ -3099,7 +3099,10 @@
         end;
 
     if (GameTicks and $3F) = 0 then
-        AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace);
+        if CheckCoordInWater(hwRound(Gear^.X), hwRound(Gear^.Y)) then
+            AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtBubble)
+        else
+            AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace);
 
     if (hwRound(Gear^.X) > (max(LAND_WIDTH,4096)+2048)) or (hwRound(Gear^.X) < -2048) or ((Gear^.Message and gmDestroy) > 0) then
         begin