chore(game-server): merge main (emulator fixes: contracts, shop, fortuna, friends, admin, presence) #16
@@ -25,6 +25,24 @@ public class EnterMatchmakingFunction : ICloudScriptFunction<FYEnterMatchAzureFu
|
|||||||
// SquadID = request.SquadId,
|
// SquadID = request.SquadId,
|
||||||
//});
|
//});
|
||||||
|
|
||||||
|
// Dedicated-server mode (2nd preprod): if GAMESERVER_ADDRESS ("host:port") is set, hand
|
||||||
|
// the client the real game server to travel to instead of the client-hosted station.
|
||||||
|
// Same image as preprod — only this env var flips the deployment type.
|
||||||
|
var gameServer = Environment.GetEnvironmentVariable("GAMESERVER_ADDRESS");
|
||||||
|
if (!string.IsNullOrEmpty(gameServer))
|
||||||
|
{
|
||||||
|
var parts = gameServer.Split(':');
|
||||||
|
return new FYEnterMatchAzureFunctionResult
|
||||||
|
{
|
||||||
|
Success = true,
|
||||||
|
ErrorMessage = "",
|
||||||
|
SingleplayerStation = false,
|
||||||
|
Address = parts[0],
|
||||||
|
Port = parts.Length > 1 && int.TryParse(parts[1], out var gsPort) ? gsPort : 7777,
|
||||||
|
MaintenanceMode = false,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
return new FYEnterMatchAzureFunctionResult
|
return new FYEnterMatchAzureFunctionResult
|
||||||
{
|
{
|
||||||
Success = true,
|
Success = true,
|
||||||
|
|||||||
@@ -100,9 +100,12 @@ public class EnterMatchmakingMatchFunction : ICloudScriptFunction<FYEnterMatchAz
|
|||||||
// player (via their mapped SignalR connection) — broadcasting to Clients.All made
|
// player (via their mapped SignalR connection) — broadcasting to Clients.All made
|
||||||
// every connected player travel too. Fall back to broadcast only if the connection
|
// every connected player travel too. Fall back to broadcast only if the connection
|
||||||
// isn't mapped yet.
|
// isn't mapped yet.
|
||||||
|
// Dedicated-server mode (2nd preprod): point the client at the real game server address
|
||||||
|
// to travel to; otherwise keep the map name (client-hosted). Same image — env flips it.
|
||||||
|
var gameServer = Environment.GetEnvironmentVariable("GAMESERVER_ADDRESS");
|
||||||
var deployMessage = new OnSquadMatchmakingSuccessMessage {
|
var deployMessage = new OnSquadMatchmakingSuccessMessage {
|
||||||
Success = true,
|
Success = true,
|
||||||
SessionID = request.MapName, // TODO: pass real squad session info
|
SessionID = string.IsNullOrEmpty(gameServer) ? request.MapName : gameServer,
|
||||||
SquadID = request.SquadId,
|
SquadID = request.SquadId,
|
||||||
};
|
};
|
||||||
var connectionId = _registry.GetConnection(userId);
|
var connectionId = _registry.GetConnection(userId);
|
||||||
|
|||||||
Reference in New Issue
Block a user