Add dynamite fuse sound
authorWuzzy <Wuzzy2@mail.ru>
Sat, 12 Oct 2019 02:06:11 +0200
changeset 15478 20066da10268
parent 15477 92f71bd1b96c
child 15479 e0ab70a90718
Add dynamite fuse sound
CREDITS
hedgewars/uGearsHandlersMess.pas
hedgewars/uSound.pas
hedgewars/uTypes.pas
share/hedgewars/Data/Sounds/dynamitefuse.ogg
--- a/CREDITS	Fri Oct 11 22:28:08 2019 +0200
+++ b/CREDITS	Sat Oct 12 02:06:11 2019 +0200
@@ -83,6 +83,8 @@
      https://www.freesound.org/people/rombart/sounds/197800/
 - Flamethrower sound originally by AslakHostaker (CC-0), adapted from
      https://freesound.org/people/AslakHostaker/sounds/395039/
+- Dynamite fuse: Based off sound by apolloaiello (CC BY 3.0)
+     https://freesound.org/people/apolloaiello/sounds/329045/
 - Landspray sound originally by Benboncan (CC BY 3.0), remixed from
      https://freesound.org/people/Benboncan/sounds/82390/
 - Portable Portal Device color switching sound by Wuzzy (CC-0)
--- a/hedgewars/uGearsHandlersMess.pas	Fri Oct 11 22:28:08 2019 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Sat Oct 12 02:06:11 2019 +0200
@@ -2348,6 +2348,13 @@
     doStepFallingGear(Gear);
     AllInactive := false;
 
+    if (Gear^.SoundChannel <> -1) and ((Gear^.State and gstDrowning) <> 0) then
+        begin
+        StopSoundChan(Gear^.SoundChannel);
+        Gear^.SoundChannel:= -1;
+        end
+    else if Gear^.SoundChannel = -1 then
+        Gear^.SoundChannel := LoopSound(sndDynamiteFuse);
     if (Gear^.State and gstDrowning) <> 0 then
         exit;
     if Gear^.Timer mod 166 = 0 then
@@ -2356,6 +2363,7 @@
         makeHogsWorry(Gear^.X, Gear^.Y, 75, Gear^.Kind);
     if Gear^.Timer = 0 then
         begin
+        StopSoundChan(Gear^.SoundChannel);
         doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Boom, Gear^.Hedgehog, EXPLAutoSound);
         DeleteGear(Gear);
         exit
--- a/hedgewars/uSound.pas	Fri Oct 11 22:28:08 2019 +0200
+++ b/hedgewars/uSound.pas	Sat Oct 12 02:06:11 2019 +0200
@@ -332,7 +332,8 @@
             (FileName:                  'Hmm.ogg'; Path: ptVoices; AltPath: ptNone),// sndHmm
             (FileName:                 'Kiss.ogg'; Path: ptSounds; AltPath: ptNone),// sndKiss
             (FileName:              'Flyaway.ogg'; Path: ptVoices; AltPath: ptNone),// sndFlyAway
-            (FileName:           'planewater.ogg'; Path: ptSounds; AltPath: ptNone) // sndPlaneWater
+            (FileName:           'planewater.ogg'; Path: ptSounds; AltPath: ptNone),// sndPlaneWater
+            (FileName:         'dynamitefuse.ogg'; Path: ptSounds; AltPath: ptNone) // sndDynamiteFuse
             );
 
 
--- a/hedgewars/uTypes.pas	Fri Oct 11 22:28:08 2019 +0200
+++ b/hedgewars/uTypes.pas	Sat Oct 12 02:06:11 2019 +0200
@@ -158,7 +158,7 @@
             sndLandGun, sndCaseImpact, sndExtraDamage, sndFirePunchHit, sndGrenade, sndThisOneIsMine,
             sndWhatThe, sndSoLong, sndOhDear, sndGonnaGetYou, sndDrat, sndBugger, sndAmazing,
             sndBrilliant, sndExcellent, sndFire, sndWatchThis, sndRunAway, sndRevenge, sndCutItOut,
-            sndLeaveMeAlone, sndOuch, sndHmm, sndKiss, sndFlyAway, sndPlaneWater);
+            sndLeaveMeAlone, sndOuch, sndHmm, sndKiss, sndFlyAway, sndPlaneWater, sndDynamiteFuse);
 
     // Available ammo types to be used by hedgehogs
     TAmmoType  = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, // 6
Binary file share/hedgewars/Data/Sounds/dynamitefuse.ogg has changed