Play countdown sounds for 4-1 remaining seconds and “boring” voice on timeout
authorWuzzy <almikes@aol.com>
Sat, 19 Nov 2016 15:00:14 +0100
changeset 11919 c9bad8a01185
parent 11918 232b57a70aca
child 11920 16ce211010cf
Play countdown sounds for 4-1 remaining seconds and “boring” voice on timeout Also play “coward” voice for skipping (instead of “boring”)
CREDITS
hedgewars/uGears.pas
hedgewars/uGearsHedgehog.pas
hedgewars/uSound.pas
hedgewars/uStats.pas
hedgewars/uTypes.pas
share/hedgewars/Data/Sounds/countdown1.ogg
share/hedgewars/Data/Sounds/countdown2.ogg
share/hedgewars/Data/Sounds/countdown3.ogg
share/hedgewars/Data/Sounds/countdown4.ogg
--- a/CREDITS	Sat Apr 30 20:55:16 2016 +0200
+++ b/CREDITS	Sat Nov 19 15:00:14 2016 +0100
@@ -81,6 +81,7 @@
      http://www.freesound.org/people/uair01/sounds/65291/
 - Air mine impact sound by Wuzzy (WTFPL), based on
      http://www.freesound.org/people/batchku/sounds/10479/
+- Countdown sounds by Wuzzy (WTFPL)
 - Laser Sight sound originally from drzhn (CC-0), remixed from
      https://www.freesound.org/people/drzhnn/sounds/199938/
 - Flying Saucer boost sound originally by Jagadamba (CC-BY 3.0), remixed from
--- a/hedgewars/uGears.pas	Sat Apr 30 20:55:16 2016 +0200
+++ b/hedgewars/uGears.pas	Sat Nov 19 15:00:14 2016 +0100
@@ -450,12 +450,20 @@
             and (not(isInMultiShoot and ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_DoesntStopTimerInMultiShoot) <> 0))) then
             //(CurrentHedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle])
                 begin
-                if (TurnTimeLeft = 5000)
-                and (cHedgehogTurnTime >= 10000)
+                if (cHedgehogTurnTime >= 10000)
                 and (not PlacingHogs)
                 and (CurrentHedgehog^.Gear <> nil)
                 and ((CurrentHedgehog^.Gear^.State and gstAttacked) = 0) then
-                    PlaySoundV(sndHurry, CurrentTeam^.voicepack);
+                    if TurnTimeLeft = 5000 then
+                        PlaySoundV(sndHurry, CurrentTeam^.voicepack)
+                    else if TurnTimeLeft = 4000 then
+                        PlaySound(sndCountdown4)
+                    else if TurnTimeLeft = 3000 then
+                        PlaySound(sndCountdown3)
+                    else if TurnTimeLeft = 2000 then
+                        PlaySound(sndCountdown2)
+                    else if TurnTimeLeft = 1000 then
+                        PlaySound(sndCountdown1);
             if ReadyTimeLeft > 0 then
                 begin
                 if (ReadyTimeLeft = 2000) and (LastVoice.snd = sndNone) then
--- a/hedgewars/uGearsHedgehog.pas	Sat Apr 30 20:55:16 2016 +0200
+++ b/hedgewars/uGearsHedgehog.pas	Sat Nov 19 15:00:14 2016 +0100
@@ -1218,6 +1218,8 @@
     if TagTurnTimeLeft = 0 then
         TagTurnTimeLeft:= TurnTimeLeft;
     TurnTimeLeft:= 0;
+    if ((HHGear^.State and gstAttacked) = 0) and (HHGear^.Damage = 0) then
+        PlaySoundV(sndBoring, Hedgehog^.Team^.voicepack);
     isCursorVisible:= false;
     HHGear^.State:= HHGear^.State and (not (gstHHDriven or gstAnimation or gstAttacking));
     AttackBar:= 0;
--- a/hedgewars/uSound.pas	Sat Apr 30 20:55:16 2016 +0200
+++ b/hedgewars/uSound.pas	Sat Nov 19 15:00:14 2016 +0100
@@ -263,7 +263,11 @@
             (FileName:           'portalshot.ogg'; Path: ptSounds; AltPath: ptNone),// sndPortalShot
             (FileName:         'portalswitch.ogg'; Path: ptSounds; AltPath: ptNone),// sndPortalSwitch
             (FileName:           'portalopen.ogg'; Path: ptSounds; AltPath: ptNone),// sndPortalOpen
-            (FileName:            'blowtorch.ogg'; Path: ptSounds; AltPath: ptNone) // sndBlowTorch
+            (FileName:            'blowtorch.ogg'; Path: ptSounds; AltPath: ptNone),// sndBlowTorch
+            (FileName:           'countdown1.ogg'; Path: ptSounds; AltPath: ptNone),// sndCountdown1
+            (FileName:           'countdown2.ogg'; Path: ptSounds; AltPath: ptNone),// sndCountdown2
+            (FileName:           'countdown3.ogg'; Path: ptSounds; AltPath: ptNone),// sndCountdown3
+            (FileName:           'countdown4.ogg'; Path: ptSounds; AltPath: ptNone) // sndCountdown4
             );
 
 
--- a/hedgewars/uStats.pas	Sat Apr 30 20:55:16 2016 +0200
+++ b/hedgewars/uStats.pas	Sat Nov 19 15:00:14 2016 +0100
@@ -141,13 +141,11 @@
         AddVoice(sndMissed, PreviousTeam^.voicepack)
     else if (AmmoUsedCount > 0) and (not isTurnSkipped) then
         begin end// nothing ?
-    else if isTurnSkipped then
+    else if isTurnSkipped and not PlacingHogs then
         begin
-        AddVoice(sndBoring, PreviousTeam^.voicepack);
+        AddVoice(sndCoward, PreviousTeam^.voicepack);
         AddCaption(FormatA(GetEventString(eidTurnSkipped), s), cWhiteColor, capgrpMessage);
         end
-    else if not PlacingHogs then
-        AddVoice(sndCoward, PreviousTeam^.voicepack);
     end;
 
 
--- a/hedgewars/uTypes.pas	Sat Apr 30 20:55:16 2016 +0200
+++ b/hedgewars/uTypes.pas	Sat Nov 19 15:00:14 2016 +0100
@@ -147,7 +147,7 @@
             sndComeonthen, sndParachute, sndBump, sndResurrector, sndPlane, sndTardis, sndFrozenHogImpact,
             sndIceBeam, sndHogFreeze, sndAirMineImpact, sndKnifeImpact, sndExtraTime, sndLaserSight,
             sndInvulnerable, sndJetpackLaunch, sndJetpackBoost, sndPortalShot, sndPortalSwitch,
-            sndPortalOpen, sndBlowTorch
+            sndPortalOpen, sndBlowTorch, sndCountdown1, sndCountdown2, sndCountdown3, sndCountdown4
             );
 
     // Available ammo types to be used by hedgehogs
Binary file share/hedgewars/Data/Sounds/countdown1.ogg has changed
Binary file share/hedgewars/Data/Sounds/countdown2.ogg has changed
Binary file share/hedgewars/Data/Sounds/countdown3.ogg has changed
Binary file share/hedgewars/Data/Sounds/countdown4.ogg has changed