Frozen air mines: Don't erase land if gstNoGravity state is off
authorWuzzy <Wuzzy2@mail.ru>
Thu, 29 Nov 2018 18:41:21 +0100
changeset 14349 e3e06b216e00
parent 14348 2221c418026a
child 14350 ef7501d9935c
Frozen air mines: Don't erase land if gstNoGravity state is off
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Thu Nov 29 17:13:09 2018 +0100
+++ b/hedgewars/uGearsHandlersMess.pas	Thu Nov 29 18:41:21 2018 +0100
@@ -2075,11 +2075,12 @@
             begin
             // Normal, damaging explosion
             doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Boom, Gear^.Hedgehog, EXPLAutoSound);
-            // Remove land created by frozen air mine sprite pixel-perfectly
-            EraseLand(
-                hwRound(Gear^.X) - SpritesData[sprFrozenAirMine].Width div 2,
-                hwRound(Gear^.Y) - SpritesData[sprFrozenAirMine].Height div 2,
-                sprFrozenAirMine, 0, 0, false, false, false, false);
+            if ((Gear^.State and gstNoGravity) <> 0) then
+                // Remove land created by frozen air mine sprite pixel-perfectly
+                EraseLand(
+                    hwRound(Gear^.X) - SpritesData[sprFrozenAirMine].Width div 2,
+                    hwRound(Gear^.Y) - SpritesData[sprFrozenAirMine].Height div 2,
+                    sprFrozenAirMine, 0, 0, false, false, false, false);
             DeleteGear(Gear)
             end;
         doStepFallingGear(Gear);