Engine:
authorsmaxx
Wed, 01 Sep 2010 18:06:52 +0200
changeset 3798 7dcfdd595b30
parent 3797 e097914ac0e2
child 3799 5341dc5a8919
Engine: * Changed ready time's voicepack sounds
hedgewars/uTeams.pas
hedgewars/uWorld.pas
--- a/hedgewars/uTeams.pas	Wed Sep 01 17:42:56 2010 +0200
+++ b/hedgewars/uTeams.pas	Wed Sep 01 18:06:52 2010 +0200
@@ -283,11 +283,18 @@
 else TurnTimeLeft:= cHedgehogTurnTime;
 if (TurnTimeLeft > 0) and (CurrentHedgehog^.BotLevel = 0) then
     begin
-    PlaySound(sndComeonthen, CurrentTeam^.voicepack);
+    if CurrentTeam^.ExtDriven then
+        PlaySound(sndIllGetYou, CurrentTeam^.voicepack)
+    else
+        PlaySound(sndYesSir, CurrentTeam^.voicepack);
     ReadyTimeLeft:= cReadyDelay
     end
 else
-    ReadyTimeLeft:= 0;
+    begin
+    if TurnTimeLeft > 0 then
+        PlaySound(sndIllGetYou, CurrentTeam^.voicepack);
+    ReadyTimeLeft:= 0
+    end
 end;
 
 function AddTeam(TeamColor: Longword): PTeam;
--- a/hedgewars/uWorld.pas	Wed Sep 01 17:42:56 2010 +0200
+++ b/hedgewars/uWorld.pas	Wed Sep 01 18:06:52 2010 +0200
@@ -860,11 +860,8 @@
 if ReadyTimeLeft > 0 then
     begin
     // TODO: move outside drawing code or do a spearate step in ugears?
-    if (ReadyTimeLeft = 1) or (ReadyTimeLeft < Lag) then
-        if (CurrentTeam^.ExtDriven or (CurrentHedgehog^.BotLevel > 0)) then
-            PlaySound(sndIllGetYou, CurrentTeam^.voicepack)
-        else
-            PlaySound(sndYesSir, CurrentTeam^.voicepack);
+    if (ReadyTimeLeft = 2000) or ((ReadyTimeLeft - Lag < 2000) and (ReadyTimeLeft > 2000)) then
+        PlaySound(sndComeonthen, CurrentTeam^.voicepack);
 
     if ReadyTimeLeft > Lag then
         dec(ReadyTimeLeft, Lag)