HOTFIX Add logging to gamepreset fallback (#41522)
* Add logging to gamepreset fallback * cleanup
This commit is contained in:
@@ -35,6 +35,7 @@ public sealed partial class GameTicker
|
||||
|
||||
private bool StartPreset(ICommonSession[] origReadyPlayers, bool force)
|
||||
{
|
||||
_sawmill.Info($"Attempting to start preset '{CurrentPreset?.ID}'");
|
||||
var startAttempt = new RoundStartAttemptEvent(origReadyPlayers, force);
|
||||
RaiseLocalEvent(startAttempt);
|
||||
|
||||
@@ -56,9 +57,12 @@ public sealed partial class GameTicker
|
||||
var fallbackPresets = _cfg.GetCVar(CCVars.GameLobbyFallbackPreset).Split(",");
|
||||
var startFailed = true;
|
||||
|
||||
_sawmill.Info($"Fallback - Failed to start round, attempting to start fallback presets.");
|
||||
foreach (var preset in fallbackPresets)
|
||||
{
|
||||
_sawmill.Info($"Fallback - Clearing up gamerules");
|
||||
ClearGameRules();
|
||||
_sawmill.Info($"Fallback - Attempting to start '{preset}'");
|
||||
SetGamePreset(preset, resetDelay: 1);
|
||||
AddGamePresetRules();
|
||||
StartGamePresetRules();
|
||||
@@ -76,6 +80,7 @@ public sealed partial class GameTicker
|
||||
startFailed = false;
|
||||
break;
|
||||
}
|
||||
_sawmill.Info($"Fallback - '{preset}' failed to start.");
|
||||
}
|
||||
|
||||
if (startFailed)
|
||||
@@ -87,6 +92,7 @@ public sealed partial class GameTicker
|
||||
|
||||
else
|
||||
{
|
||||
_sawmill.Info($"Fallback - Failed to start preset but fallbacks are disabled. Returning to Lobby.");
|
||||
FailedPresetRestart();
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user