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:
@@ -178,7 +178,7 @@ namespace OpenRA
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Map player
|
// 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;
|
Color = pr.Color;
|
||||||
PlayerName = pr.Name;
|
PlayerName = pr.Name;
|
||||||
NonCombatant = pr.NonCombatant;
|
NonCombatant = pr.NonCombatant;
|
||||||
|
|||||||
Reference in New Issue
Block a user