summaryrefslogtreecommitdiffstats
path: root/src/object/robotmain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/object/robotmain.cpp')
-rw-r--r--src/object/robotmain.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index ca18f54..f5cdcd8 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -3476,10 +3476,9 @@ bool CRobotMain::EventFrame(const Event &event)
{
m_checkEndTime = m_time;
CheckEndMission(true);
+ UpdateAudio(true);
}
- UpdateAudio(true);
-
if (m_winDelay > 0.0f && !m_editLock)
{
m_winDelay -= event.rTime;
@@ -3667,7 +3666,7 @@ void CRobotMain::Convert()
}
}
- if (Cmd(line, "EndMissionTake"))
+ if (Cmd(line, "EndMissionTake") || Cmd(line, "AudioChange"))
{
char* p = strstr(line, "pos=");
if (p != 0)
@@ -6595,6 +6594,8 @@ void CRobotMain::UpdateAudio(bool frame)
for (int t = 0; t < m_audioChangeTotal; t++)
{
+ if(m_audioChange[t].changed) continue;
+
Math::Vector bPos = m_audioChange[t].pos;
bPos.y = 0.0f;
@@ -6635,8 +6636,7 @@ void CRobotMain::UpdateAudio(bool frame)
}
if (nb >= m_audioChange[t].min &&
- nb <= m_audioChange[t].max &&
- !m_audioChange[t].changed)
+ nb <= m_audioChange[t].max)
{
CLogger::GetInstancePointer()->Debug("Changing music...\n");
m_sound->StopMusic();