New fonts, loading progress doesn't stay stuck at 70% during SoundPlayer initialization

This commit is contained in:
Regalis
2017-02-22 23:31:11 +02:00
parent 27e74490a0
commit 5006a9af6c
8 changed files with 17 additions and 14 deletions
+3 -1
View File
@@ -238,7 +238,9 @@ namespace Barotrauma
while (!SoundPlayer.Initialized)
{
i++;
TitleScreen.LoadState = Math.Min((float)TitleScreen.LoadState + 0.5f*i, 70.0f);
TitleScreen.LoadState = SoundPlayer.SoundCount == 0 ?
30.0f :
Math.Min(30.0f + 40.0f * i / Math.Max(SoundPlayer.SoundCount, 1), 70.0f);
yield return CoroutineStatus.Running;
}