This commit is contained in:
Alayan
2019-02-10 17:28:28 +01:00
parent 9ad2823f4d
commit a9d81d2aa5
2 changed files with 6 additions and 19 deletions

View File

@@ -1393,8 +1393,8 @@ void World::escapePressed()
m_karts[i]->getController()->action((PlayerAction)j, 0);
}
}
if (NetworkConfig::get()->isNetworking() || getPhase() >= MUSIC_PHASE)
new RacePausedDialog(0.8f, 0.6f);
new RacePausedDialog(0.8f, 0.6f);
} // escapePressed
// ----------------------------------------------------------------------------

View File

@@ -221,28 +221,15 @@ void WorldStatus::updateTime(int ticks)
m_auxiliary_ticks += 6;
}
// Work around a bug that occurred on linux once:
// the SFXManager::get() kept on reporting that it is playing,
// while it was not - so STK would never reach the ready
// ... phase. Since the sound effect is about 3 seconds
// long, we use the aux timer to force the next phase
// after 3.5 seconds.
if (m_track_intro_sound->getStatus() == SFXBase::SFX_PLAYING &&
m_auxiliary_ticks < stk_config->time2Ticks(3.5f) )
return; // Do not increase time
// Wait before ready phase if sounds are disabled
if (!UserConfigParams::m_sfx &&
m_auxiliary_ticks < stk_config->time2Ticks(3.0f))
return;
if (!m_play_track_intro_sound)
{
startEngines();
if (m_auxiliary_ticks < stk_config->time2Ticks(3.0f))
return; // Do not increase time
}
// Wait before ready phase
if (m_auxiliary_ticks < stk_config->time2Ticks(3.0f))
return;
m_auxiliary_ticks = 0;
// In a networked game the client needs to wait for a notification