Prevent changing world players after being set once.

This commit is contained in:
RoosterDragon
2015-12-22 16:28:40 +00:00
parent 387d0d0e3f
commit 611a928a47

View File

@@ -42,6 +42,8 @@ namespace OpenRA
public void SetPlayers(IEnumerable<Player> players, Player localPlayer)
{
if (Players.Length > 0)
throw new InvalidOperationException("Players are fixed once they have been set.");
Players = players.ToArray();
SetLocalPlayer(localPlayer);
}