Stop minigun sound when gtMinigun is destroyed
authoralfadur
Fri, 13 Apr 2018 20:35:35 +0200
changeset 13323 15d804dcd736
parent 13322 b77a9380dd0f
child 13324 543ab994c9bc
Stop minigun sound when gtMinigun is destroyed
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Fri Apr 13 13:03:51 2018 -0400
+++ b/hedgewars/uGearsHandlersMess.pas	Fri Apr 13 20:35:35 2018 +0200
@@ -6724,6 +6724,8 @@
 
     if (Gear^.Timer = 0) or ((HHGear^.State and gstHHDriven) = 0) then
     begin
+        if (HHGear^.State and gstHHDriven) = 0 then
+            StopSound(sndMinigun);
         HHGear^.State := HHGear^.State and (not gstNotKickable);
         ClearHitOrder();
         DeleteGear(Gear);