Add flamethrower sound
authorWuzzy <Wuzzy2@mail.ru>
Fri, 26 Oct 2018 15:48:52 +0200
changeset 13983 cde9920150c6
parent 13982 681a53c8b18c
child 13984 817dc8b67b0d
Add flamethrower sound
CREDITS
hedgewars/uGearsHandlersMess.pas
hedgewars/uSound.pas
hedgewars/uTypes.pas
--- a/CREDITS	Fri Oct 26 15:46:53 2018 +0200
+++ b/CREDITS	Fri Oct 26 15:48:52 2018 +0200
@@ -124,6 +124,8 @@
      https://www.freesound.org/people/Jagadamba/sounds/257057/
 - Blowtorch sound originally by rombard (CC-0), remixed from
      https://www.freesound.org/people/rombart/sounds/197800/
+- Flamethrower sound originally by AslakHostaker (CC-0), adapted from
+     https://freesound.org/people/AslakHostaker/sounds/395039/
 - Portable Portal Device color switching sound by Wuzzy (CC-0)
 - Portable Portal Device shot sound originally by bubaproducer (CC-BY 3.0), remixed from
      https://www.freesound.org/people/bubaproducer/sounds/151026/ 
--- a/hedgewars/uGearsHandlersMess.pas	Fri Oct 26 15:46:53 2018 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Fri Oct 26 15:48:52 2018 +0200
@@ -5497,6 +5497,7 @@
     HHGear := Gear^.Hedgehog^.Gear;
     if HHGear = nil then
         begin
+        StopSoundChan(Gear^.SoundChannel, 300);
         DeleteGear(gear);
         exit
         end;
@@ -5553,6 +5554,7 @@
     if (Gear^.Health = 0) or ((HHGear^.State and gstHHDriven) = 0) then
         begin
         HHGear^.State := HHGear^.State and (not gstNotKickable);
+        StopSoundChan(Gear^.SoundChannel, 300);
         DeleteGear(Gear);
         AfterAttack
         end
@@ -5576,6 +5578,7 @@
     HHGear := Gear^.Hedgehog^.Gear;
     HHGear^.Message := HHGear^.Message and (not (gmUp or gmDown or gmLeft or gmRight));
     HHGear^.State := HHGear^.State or gstNotKickable;
+    Gear^.SoundChannel := LoopSound(sndFlamethrower);
     Gear^.doStep := @doStepFlamethrowerWork
 end;
 
--- a/hedgewars/uSound.pas	Fri Oct 26 15:46:53 2018 +0200
+++ b/hedgewars/uSound.pas	Fri Oct 26 15:48:52 2018 +0200
@@ -297,7 +297,8 @@
             (FileName:              'custom6.ogg'; Path: ptSounds; AltPath: ptNone),// sndCustom6
             (FileName:              'custom7.ogg'; Path: ptSounds; AltPath: ptNone),// sndCustom7
             (FileName:              'custom8.ogg'; Path: ptSounds; AltPath: ptNone),// sndCustom8
-            (FileName:              'minigun.ogg'; Path: ptSounds; AltPath: ptNone) // sndMinigun
+            (FileName:              'minigun.ogg'; Path: ptSounds; AltPath: ptNone),// sndMinigun
+            (FileName:         'flamethrower.ogg'; Path: ptSounds; AltPath: ptNone) // sndFlamethrower
             );
 
 
--- a/hedgewars/uTypes.pas	Fri Oct 26 15:46:53 2018 +0200
+++ b/hedgewars/uTypes.pas	Fri Oct 26 15:48:52 2018 +0200
@@ -151,7 +151,7 @@
             sndInvulnerable, sndJetpackLaunch, sndJetpackBoost, sndPortalShot, sndPortalSwitch,
             sndPortalOpen, sndBlowTorch, sndCountdown1, sndCountdown2, sndCountdown3, sndCountdown4,
             sndCreeperDrop, sndCreeperWater, sndCreeperDie, sndCustom1, sndCustom2, sndCustom3, sndCustom4,
-            sndCustom5, sndCustom6, sndCustom7, sndCustom8, sndMinigun);
+            sndCustom5, sndCustom6, sndCustom7, sndCustom8, sndMinigun, sndFlamethrower);
 
     // Available ammo types to be used by hedgehogs
     TAmmoType  = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, // 6