From 5164c3cd7d3b3d3ec6ce1a67d3364796230140ed Mon Sep 17 00:00:00 2001 From: geckosoft Date: Mon, 1 Nov 2010 05:13:42 +0100 Subject: [PATCH] Hack: Changed the ChooseFreePlayerIndex (hack on its own..) to loop till 256 instead of 8 (ie increasing max player support to 256) --- OpenRA.Game/Server/Server.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/OpenRA.Game/Server/Server.cs b/OpenRA.Game/Server/Server.cs index 395eebf9a8..8e4eb1349a 100644 --- a/OpenRA.Game/Server/Server.cs +++ b/OpenRA.Game/Server/Server.cs @@ -191,14 +191,16 @@ namespace OpenRA.Server * for manual spawnpoint choosing. * - pick sensible non-conflicting colors for bots. */ - + /// + /// @todo The 256 is a big hack, need to look @ amount of available slots instead? + /// static int ChooseFreePlayerIndex() { - for (var i = 0; i < 8; i++) + for (var i = 0; i < 256; i++) // 256 was 8, but thats bit low if (conns.All(c => c.PlayerIndex != i)) return i; - throw new InvalidOperationException("Already got 8 players"); + throw new InvalidOperationException("Already got 256 players"); } static int ChooseFreeSlot()