From b3d415a23143df60d4a2911006044e0623682e76 Mon Sep 17 00:00:00 2001 From: Michael Theall Date: Mon, 27 Oct 2025 16:43:23 -0500 Subject: [PATCH 1/2] update schema --- RLBotCS/Conversion/FlatToCommand.cs | 6 +++--- RLBotCS/Main.cs | 2 +- flatbuffers-schema | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RLBotCS/Conversion/FlatToCommand.cs b/RLBotCS/Conversion/FlatToCommand.cs index 438a496..83d9936 100644 --- a/RLBotCS/Conversion/FlatToCommand.cs +++ b/RLBotCS/Conversion/FlatToCommand.cs @@ -373,11 +373,11 @@ private static string MapInputRestriction(InputRestrictionMutator option) => _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), }; - private static string MapScoringRule(ScoringRule option) => + private static string MapScoringRule(ScoringRuleMutator option) => option switch { - ScoringRule.Default => "", - ScoringRule.DisableGoalScoring => "DisableGoalScoring", + ScoringRuleMutator.Default => "", + ScoringRuleMutator.Disabled => "DisableGoalScoring", _ => throw new ArgumentOutOfRangeException(nameof(option), option, null), }; diff --git a/RLBotCS/Main.cs b/RLBotCS/Main.cs index 3b32aaf..f1e2f76 100644 --- a/RLBotCS/Main.cs +++ b/RLBotCS/Main.cs @@ -10,7 +10,7 @@ if (args.Length > 0 && args[0] == "--version") { Console.WriteLine( - "RLBotServer v5.beta.7.9\n" + "RLBotServer v5.beta.7.10\n" + $"Bridge {BridgeVersion.Version}\n" + "@ https://www.rlbot.org & https://github.com/RLBot/core" ); diff --git a/flatbuffers-schema b/flatbuffers-schema index 488b414..7bec65f 160000 --- a/flatbuffers-schema +++ b/flatbuffers-schema @@ -1 +1 @@ -Subproject commit 488b414e2a046c15cd394c1fd4788fdc9074cefe +Subproject commit 7bec65f4fa6506f91705ccab9593aaeab75a5b27 From 3cf5430242718f64fefae6f2d9a4fdb295e390ba Mon Sep 17 00:00:00 2001 From: Michael Theall Date: Tue, 28 Oct 2025 19:58:29 -0500 Subject: [PATCH 2/2] Add ping mechanism --- RLBotCS/Server/FlatBuffersSession.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/RLBotCS/Server/FlatBuffersSession.cs b/RLBotCS/Server/FlatBuffersSession.cs index 75d1444..48d0614 100644 --- a/RLBotCS/Server/FlatBuffersSession.cs +++ b/RLBotCS/Server/FlatBuffersSession.cs @@ -36,6 +36,8 @@ public readonly record struct DistributeBallPrediction(BallPredictionT BallPredi public readonly record struct StopMatch(bool Force) : SessionMessage; public readonly record struct UpdateRendering(RenderingStatus Status) : SessionMessage; + + public readonly record struct PingResponse() : SessionMessage; } class FlatBuffersSession @@ -306,12 +308,16 @@ await _bridge.WriteAsync( var desiredGameState = msg.MessageAsDesiredGameState().UnPack(); await _bridge.WriteAsync(new SetGameState(desiredGameState)); - break; + case InterfaceMessage.RenderingStatus: var renderingStatus = msg.MessageAsRenderingStatus(); await _rlbotServer.WriteAsync(new UpdateRendering(renderingStatus)); break; + + case InterfaceMessage.PingRequest: + _incomingMessages.Writer.TryWrite(new SessionMessage.PingResponse()); + break; } return true; @@ -427,6 +433,11 @@ private async Task HandleInternalMessages() } } break; + case SessionMessage.PingResponse m: + SendPayloadToClient( + CoreMessageUnion.FromPingResponse(new PingResponseT()) + ); + break; } }