hedgewars/uGearsHandlersMess.pas
changeset 14742 2e8213c0951f
parent 14735 2d859d34e6f6
child 14748 2ad6f0555e61
--- a/hedgewars/uGearsHandlersMess.pas	Tue Apr 02 01:34:13 2019 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Tue Apr 02 14:51:55 2019 +0200
@@ -2999,7 +2999,7 @@
     if (GameTicks and $3F) = 0 then
         AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace);
 
-    if (hwRound(Gear^.X) > (max(LAND_WIDTH,4096)+2048)) or (hwRound(Gear^.X) < -2048) then
+    if (hwRound(Gear^.X) > (max(LAND_WIDTH,4096)+2048)) or (hwRound(Gear^.X) < -2048) or ((Gear^.Message and gmDestroy) > 0) then
         begin
         // avoid to play forever (is this necessary?)
         StopSoundChan(Gear^.SoundChannel);