Build 0.17.14.0

This commit is contained in:
Markus Isberg
2022-04-27 07:44:37 +09:00
parent 7a09cf3260
commit 6e38444fc4
47 changed files with 560 additions and 280 deletions
@@ -14,6 +14,10 @@ namespace Barotrauma
{
partial class GameSession
{
#if DEBUG
public static float MinimumLoadingTime;
#endif
public enum InfoFrameTab { Crew, Mission, MyCharacter, Traitor };
public readonly EventManager EventManager;
@@ -355,6 +359,9 @@ namespace Barotrauma
public void StartRound(LevelData? levelData, bool mirrorLevel = false, SubmarineInfo? startOutpost = null, SubmarineInfo? endOutpost = null)
{
#if DEBUG
DateTime startTime = DateTime.Now;
#endif
AfflictionPrefab.LoadAllEffects();
MirrorLevel = mirrorLevel;
@@ -485,6 +492,15 @@ namespace Barotrauma
}
}
#if DEBUG
double startDuration = (DateTime.Now - startTime).TotalSeconds;
if (startDuration < MinimumLoadingTime)
{
int sleepTime = (int)((MinimumLoadingTime - startDuration) * 1000);
DebugConsole.NewMessage($"Stalling round start by {sleepTime / 1000.0f} s (minimum loading time set to {MinimumLoadingTime})...", Color.Magenta);
System.Threading.Thread.Sleep(sleepTime);
}
#endif
#if CLIENT
if (GameMode is CampaignMode && levelData != null) { SteamAchievementManager.OnBiomeDiscovered(levelData.Biome); }