Air attack: Add simple appear/disappear effect in weWrap
authorWuzzy <Wuzzy2@mail.ru>
Thu, 11 Jul 2019 17:15:30 +0200
changeset 15237 a9a1f5824076
parent 15236 c10e9261ab9c
child 15238 b189d6a2ecda
Air attack: Add simple appear/disappear effect in weWrap
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Thu Jul 11 16:24:09 2019 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Thu Jul 11 17:15:30 2019 +0200
@@ -3120,6 +3120,8 @@
             StopSoundChan(Gear^.SoundChannel);
             Gear^.SoundChannel := -1;
             end;
+        if (WorldEdge = weWrap) then
+            AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtBigExplosion);
         DeleteGear(Gear);
         exit;
         end;
@@ -3176,6 +3178,11 @@
         end;
 
     Gear^.Y := int2hwFloat(topY - 300);
+
+    // Appear out of nowhere in wrap
+    if (WorldEdge = weWrap) then
+        AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtBigExplosion);
+
     Gear^.dX := int2hwFloat(Gear^.Target.X) - int2hwFloat(Gear^.Tag * (Gear^.Health-1) * Gear^.Damage) / 2;
 
     // calcs for Napalm Strike, so that it will hit the target (without wind at least :P)