Hide hog GUI extras in scripted cinematic, also suppress some voices
authorWuzzy <Wuzzy2@mail.ru>
Mon, 21 Jan 2019 23:50:56 +0100
changeset 14677 db05d9bf7466
parent 14676 bf37a416ad8f
child 14678 b390479f24c1
Hide hog GUI extras in scripted cinematic, also suppress some voices
ChangeLog.txt
hedgewars/uGears.pas
hedgewars/uGearsRender.pas
hedgewars/uTeams.pas
--- a/ChangeLog.txt	Mon Jan 21 23:37:12 2019 +0100
+++ b/ChangeLog.txt	Mon Jan 21 23:50:56 2019 +0100
@@ -49,6 +49,7 @@
 
 Graphics:
  + Show contour of flying saucer when in highly opaque water
+ + Remove visual clutter in cut scenes
  * Fix speech bubbles overlapping in the wrong order
  * Fix wrong ice beam angle if it goes diagonally up out of map through world wrap
  * Fix double water splash when flying saucer drowns
--- a/hedgewars/uGears.pas	Mon Jan 21 23:37:12 2019 +0100
+++ b/hedgewars/uGears.pas	Mon Jan 21 23:50:56 2019 +0100
@@ -554,7 +554,7 @@
                 PlaySound(sndCountdown1);
         if ReadyTimeLeft > 0 then
             begin
-            if (ReadyTimeLeft = 2000) and (LastVoice.snd = sndNone) and (not PlacingHogs) then
+            if (ReadyTimeLeft = 2000) and (LastVoice.snd = sndNone) and (not PlacingHogs) and (not CinematicScript) then
                 AddVoice(sndComeonthen, CurrentTeam^.voicepack);
             dec(ReadyTimeLeft)
             end
--- a/hedgewars/uGearsRender.pas	Mon Jan 21 23:37:12 2019 +0100
+++ b/hedgewars/uGearsRender.pas	Mon Jan 21 23:50:56 2019 +0100
@@ -272,6 +272,8 @@
         exit;
     if (Gear^.State and gstHHGone) <> 0 then
         exit;
+    if (CinematicScript) then
+        exit;
 
     // render finger (pointing arrow)
     if bShowFinger and ((Gear^.State and gstHHDriven) <> 0) then
--- a/hedgewars/uTeams.pas	Mon Jan 21 23:37:12 2019 +0100
+++ b/hedgewars/uTeams.pas	Mon Jan 21 23:50:56 2019 +0100
@@ -457,14 +457,11 @@
 // turn start taunt: sndYesSir for own team, sndHmm for enemy or computer team
 if (TurnTimeLeft > 0) and (CurrentHedgehog^.BotLevel = 0) then
     begin
-    if CurrentTeam^.ExtDriven then
-        begin
-        AddVoice(sndHmm, CurrentTeam^.voicepack)
-        end
-    else
-        begin
-        AddVoice(sndYesSir, CurrentTeam^.voicepack);
-        end;
+    if (not CinematicScript) then
+        if CurrentTeam^.ExtDriven then
+            AddVoice(sndHmm, CurrentTeam^.voicepack)
+        else
+            AddVoice(sndYesSir, CurrentTeam^.voicepack);
     if cHedgehogTurnTime < 1000000 then
         ReadyTimeLeft:= cReadyDelay;
     s:= ansistring(CurrentTeam^.TeamName);
@@ -472,11 +469,9 @@
     end
 else
     begin
-    if TurnTimeLeft > 0 then
-        begin
-        AddVoice(sndHmm, CurrentTeam^.voicepack)
-        end;
-    ReadyTimeLeft:= 0
+    if (TurnTimeLeft > 0) and (not CinematicScript) then
+        AddVoice(sndHmm, CurrentTeam^.voicepack);
+    ReadyTimeLeft:= 0;
     end;
 end;