Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Server Endpoint Usage #304

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added a new end point for raid join for UDP to track raid players ser…
…ver side
  • Loading branch information
hickorysb committed May 2, 2024
commit 25a9b2a387646f43d246d41306e9f896a92e6f71
2 changes: 1 addition & 1 deletion Source/Coop/Components/SITMatchmakerGUIComponent.cs
Original file line number Diff line number Diff line change
@@ -520,7 +520,7 @@ void DrawBrowserWindow(int windowID)
int playerCount = int.Parse(match["PlayerCount"].ToString());
string protocol = (string)match["Protocol"];

if (playerCount > 0 || protocol == "PeerToPeerUdp")
if (playerCount > 0)
{
// Display Host Name with "Raid" label
GUI.Label(new UnityEngine.Rect(10, yPos, cellWidth - separatorWidth, cellHeight), $"{match["HostName"]} Raid", labelStyle);
6 changes: 6 additions & 0 deletions Source/Coop/SITGameModes/CoopSITGame.cs
Original file line number Diff line number Diff line change
@@ -643,6 +643,12 @@ public override async Task<LocalPlayer> vmethod_2(int playerId, Vector3 position
Logger.LogDebug("Sending Connect to Relay");
GameClient.SendData(Encoding.UTF8.GetBytes(j.ToString()));
break;
case ESITProtocol.PeerToPeerUdp:
JObject js = new JObject();
js.Add("serverId", SITGameComponent.GetServerId());
js.Add("profileId", profile.ProfileId);
AkiBackendCommunication.Instance.PostJsonAndForgetAsync("/coop/raid/udp/join", js.SITToJson());
break;
}


Loading