From 4cf3f2b2920f76085c70b648ce5c80ef2705b135 Mon Sep 17 00:00:00 2001 From: avolkov Date: Mon, 26 Oct 2009 18:25:56 +0000 Subject: [PATCH] Do not make alien comm code play each track individually when there are events interspersed, it causes subtitle blinking, and there is no need for this git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3253 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/uqm/comm.c | 21 +++++++++------------ sc2/src/uqm/comm/starbas/starbas.c | 6 ++++-- sc2/src/uqm/comm/syreen/syreenc.c | 1 - 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/sc2/src/uqm/comm.c b/sc2/src/uqm/comm.c index 616581b3e..a18cc0bd7 100644 --- a/sc2/src/uqm/comm.c +++ b/sc2/src/uqm/comm.c @@ -569,19 +569,16 @@ SpewPhrases (COUNT wait_track) which_track = PlayingTrack (); if (which_track == 0 && !rewind) - { - // initial start of player - if (wait_track == 1 || wait_track == (COUNT)~0) + { // initial start of player + UnlockMutex (GraphicsLock); + PlayTrack (); + // wait for the trackplayer to start playing + do { - UnlockMutex (GraphicsLock); - PlayTrack (); - do - { - TaskSwitch (); - which_track = PlayingTrack (); - } while (!which_track); - LockMutex (GraphicsLock); - } + TaskSwitch (); + which_track = PlayingTrack (); + } while (!which_track); + LockMutex (GraphicsLock); } else if (which_track <= wait_track) { // XXX: I don't know why this is here, but it is not harmful. diff --git a/sc2/src/uqm/comm/starbas/starbas.c b/sc2/src/uqm/comm/starbas/starbas.c index 1e7938a6a..4b9ac788e 100644 --- a/sc2/src/uqm/comm/starbas/starbas.c +++ b/sc2/src/uqm/comm/starbas/starbas.c @@ -1288,11 +1288,13 @@ DiscussDevices (BOOLEAN TalkAbout) if (VuxBeastIndex) { - for (i = 1; i < VuxBeastIndex; ++i) - AlienTalkSegue (i); + // Run all tracks upto the Vux Beast scientist's report + AlienTalkSegue (VuxBeastIndex - 1); + // Disable Commander's speech animation and run the report i = CommData.AlienTalkDesc.NumFrames; CommData.AlienTalkDesc.NumFrames = 0; AlienTalkSegue (VuxBeastIndex); + // Enable Commander's speech animation and run the rest CommData.AlienTalkDesc.NumFrames = i; AlienTalkSegue ((COUNT)~0); } diff --git a/sc2/src/uqm/comm/syreen/syreenc.c b/sc2/src/uqm/comm/syreen/syreenc.c index 8db8145e2..9518689eb 100644 --- a/sc2/src/uqm/comm/syreen/syreenc.c +++ b/sc2/src/uqm/comm/syreen/syreenc.c @@ -218,7 +218,6 @@ FriendlyExit (RESPONSE_REF R) NPCPhrase (LATER); NPCPhrase (SEX_GOODBYE); - AlienTalkSegue (1); AlienTalkSegue (2); XFormColorMap (GetColorMapAddress ( SetAbsColorMapIndex (CommData.AlienColorMap, 0)