Prevent changing world players after being set once.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user