Fix map-player bots not working on dedicated servers.

The host is almost never going to be client index 0
on public dedicated servers. Set to the actual host
client ID instead.
This commit is contained in:
Paul Chote
2021-05-18 22:32:26 +01:00
committed by reaperrr
parent 872adbec0a
commit dc3dc7df73

View File

@@ -178,7 +178,7 @@ namespace OpenRA
else
{
// Map player
ClientIndex = 0; // Owned by the host (TODO: fix this)
ClientIndex = world.LobbyInfo.Clients.FirstOrDefault(c => c.IsAdmin)?.Index ?? 0; // Owned by the host (TODO: fix this)
Color = pr.Color;
PlayerName = pr.Name;
NonCombatant = pr.NonCombatant;