From 44a78e4d138e6f3c23dbf26867530bb38380bd15 Mon Sep 17 00:00:00 2001 From: Virx Date: Thu, 8 May 2025 19:26:15 -0400 Subject: [PATCH 1/2] Distinguish debug logs a bit more --- RLBotCS/ManagerTools/Logging.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RLBotCS/ManagerTools/Logging.cs b/RLBotCS/ManagerTools/Logging.cs index 1421c99..9db7d97 100644 --- a/RLBotCS/ManagerTools/Logging.cs +++ b/RLBotCS/ManagerTools/Logging.cs @@ -75,7 +75,7 @@ private string[] GetLogLevelColors(LogLevel logLevel) => logLevel switch { LogLevel.Trace => new[] { Grey, Grey, Grey, Grey }, - LogLevel.Debug => new[] { Grey, LightBlue, Grey, LightBlue }, + LogLevel.Debug => new[] { Grey, Grey, Grey, LightBlue }, LogLevel.Information => new[] { Grey, LightBlue, Grey, LightBlue }, LogLevel.Warning => new[] { Yellow, Yellow, Yellow, Yellow }, LogLevel.Error => new[] { Red, Red, Red, Red }, From 22fb9058e9644bd361ffe7c64b14a90857daf231 Mon Sep 17 00:00:00 2001 From: Virx Date: Thu, 8 May 2025 19:27:37 -0400 Subject: [PATCH 2/2] Fix C&S for LAN matches --- RLBotCS/Main.cs | 2 +- RLBotCS/Server/BridgeHandler.cs | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/RLBotCS/Main.cs b/RLBotCS/Main.cs index ee30999..94bf257 100644 --- a/RLBotCS/Main.cs +++ b/RLBotCS/Main.cs @@ -8,7 +8,7 @@ if (args.Length > 0 && args[0] == "--version") { - Console.WriteLine("RLBotServer v5.beta.6.6"); + Console.WriteLine("RLBotServer v5.beta.6.7"); Environment.Exit(0); } diff --git a/RLBotCS/Server/BridgeHandler.cs b/RLBotCS/Server/BridgeHandler.cs index b5114d8..6200e7d 100644 --- a/RLBotCS/Server/BridgeHandler.cs +++ b/RLBotCS/Server/BridgeHandler.cs @@ -85,6 +85,13 @@ private async Task HandleServer() var mapJustLoaded = MessageHandler.ReceivedMatchInfo(messageClump); if (mapJustLoaded) { + if (_context.GameState.MatchPhase != MatchPhase.Paused) + { + // LAN matches don't set the MatchPhase to paused, which breaks Continue & Spawn + // thankfully, we can just manually set the match phase to paused + _context.GameState.MatchPhase = MatchPhase.Paused; + } + if (_context.MatchConfig is { AutoSaveReplay: true }) { _context.MatchCommandQueue.AddConsoleCommand( @@ -97,6 +104,10 @@ private async Task HandleServer() _context.GetPlayerSpawner() ); _context.Writer.TryWrite(new DistributeFieldInfo(_context.GameState)); + + // wait for the next tick, + // this ensures we don't start the match too soon + continue; } if (_context.GameState.MatchEnded)