Skip to content

Commit f0960af

Browse files
authored
Merge pull request #111 from RLBot/lan
Fix C&S on LAN matches
2 parents d464ef7 + 22fb905 commit f0960af

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

RLBotCS/Main.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
if (args.Length > 0 && args[0] == "--version")
1010
{
11-
Console.WriteLine("RLBotServer v5.beta.6.6");
11+
Console.WriteLine("RLBotServer v5.beta.6.7");
1212
Environment.Exit(0);
1313
}
1414

RLBotCS/ManagerTools/Logging.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private string[] GetLogLevelColors(LogLevel logLevel) =>
7575
logLevel switch
7676
{
7777
LogLevel.Trace => new[] { Grey, Grey, Grey, Grey },
78-
LogLevel.Debug => new[] { Grey, LightBlue, Grey, LightBlue },
78+
LogLevel.Debug => new[] { Grey, Grey, Grey, LightBlue },
7979
LogLevel.Information => new[] { Grey, LightBlue, Grey, LightBlue },
8080
LogLevel.Warning => new[] { Yellow, Yellow, Yellow, Yellow },
8181
LogLevel.Error => new[] { Red, Red, Red, Red },

RLBotCS/Server/BridgeHandler.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ private async Task HandleServer()
8585
var mapJustLoaded = MessageHandler.ReceivedMatchInfo(messageClump);
8686
if (mapJustLoaded)
8787
{
88+
if (_context.GameState.MatchPhase != MatchPhase.Paused)
89+
{
90+
// LAN matches don't set the MatchPhase to paused, which breaks Continue & Spawn
91+
// thankfully, we can just manually set the match phase to paused
92+
_context.GameState.MatchPhase = MatchPhase.Paused;
93+
}
94+
8895
if (_context.MatchConfig is { AutoSaveReplay: true })
8996
{
9097
_context.MatchCommandQueue.AddConsoleCommand(
@@ -97,6 +104,10 @@ private async Task HandleServer()
97104
_context.GetPlayerSpawner()
98105
);
99106
_context.Writer.TryWrite(new DistributeFieldInfo(_context.GameState));
107+
108+
// wait for the next tick,
109+
// this ensures we don't start the match too soon
110+
continue;
100111
}
101112

102113
if (_context.GameState.MatchEnded)

0 commit comments

Comments
 (0)