Fix broken continue button in cutscene if long loading time
This commit is contained in:
parent
8fead715da
commit
7aff7f9ba9
@ -252,6 +252,14 @@ void CutsceneWorld::update(int ticks)
|
||||
m_time = now - m_time_at_second_reset;
|
||||
}
|
||||
|
||||
if (m_aborted)
|
||||
{
|
||||
// We can only set end duration after m_time is updated in the previous
|
||||
// step
|
||||
if (m_time < m_duration - m_fade_duration)
|
||||
m_duration = m_time + m_fade_duration;
|
||||
}
|
||||
|
||||
float fade = 0.0f;
|
||||
float fadeIn = -1.0f;
|
||||
float fadeOut = -1.0f;
|
||||
|
@ -113,11 +113,7 @@ public:
|
||||
// ------------------------------------------------------------------------
|
||||
static void setUseDuration(bool use_duration) { s_use_duration = use_duration; }
|
||||
// ------------------------------------------------------------------------
|
||||
void abortCutscene()
|
||||
{
|
||||
if (m_time < m_duration - m_fade_duration) m_duration = m_time + m_fade_duration;
|
||||
m_aborted = true;
|
||||
}
|
||||
void abortCutscene() { m_aborted = true; }
|
||||
|
||||
}; // CutsceneWorld
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user