Tweak voices a bit (always play hurry at correct time, skip "come on then" if other voice is playing)
authornemo
Tue, 24 Jan 2012 11:54:53 -0500
changeset 6596 4c06ea12de1c
parent 6595 f567d52183ec
child 6599 1d3746138113
Tweak voices a bit (always play hurry at correct time, skip "come on then" if other voice is playing)
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Tue Jan 24 03:38:18 2012 +0100
+++ b/hedgewars/uGears.pas	Tue Jan 24 11:54:53 2012 -0500
@@ -418,10 +418,10 @@
                 and (not PlacingHogs)
                 and (CurrentHedgehog^.Gear <> nil)
                 and ((CurrentHedgehog^.Gear^.State and gstAttacked) = 0) then
-                    AddVoice(sndHurry, CurrentTeam^.voicepack);
+                    PlaySound(sndHurry, CurrentTeam^.voicepack);
             if ReadyTimeLeft > 0 then
                 begin
-                if ReadyTimeLeft = 2000 then
+                if (ReadyTimeLeft = 2000) and (LastVoice.snd = sndNone) then
                     AddVoice(sndComeonthen, CurrentTeam^.voicepack);
                 dec(ReadyTimeLeft)
                 end