Fix crash in OrderManager

This commit is contained in:
teinarss
2021-05-21 18:19:58 +02:00
committed by Paul Chote
parent acccb01c76
commit d10c592987
3 changed files with 41 additions and 25 deletions

View File

@@ -491,6 +491,20 @@ namespace OpenRA
{
var shellmap = ChooseShellmap();
// Add a spectator client for the local player,
// who is controlling the map via scripted orders
OrderManager.LobbyInfo.Clients.Add(new Session.Client
{
Index = OrderManager.Connection.LocalClientId,
Name = Settings.Player.Name,
PreferredColor = Settings.Player.Color,
Color = Settings.Player.Color,
Faction = "Random",
SpawnPoint = 0,
Team = 0,
State = Session.ClientState.Ready
});
using (new PerfTimer("StartGame"))
{
StartGame(shellmap, WorldType.Shellmap);