added server-driven local player choosing
This commit is contained in:
@@ -33,7 +33,11 @@ namespace OpenRa.Game
|
||||
|
||||
public static Dictionary<int, Player> players = new Dictionary<int, Player>();
|
||||
|
||||
public static Player LocalPlayer { get { return players[localPlayerIndex]; } }
|
||||
public static Player LocalPlayer
|
||||
{
|
||||
get { return players[localPlayerIndex]; }
|
||||
set { localPlayerIndex = value.Index; }
|
||||
}
|
||||
public static BuildingInfluenceMap BuildingInfluence;
|
||||
public static UnitInfluenceMap UnitInfluence;
|
||||
|
||||
|
||||
@@ -104,7 +104,9 @@ namespace OpenRa.Game
|
||||
}
|
||||
case "AssignPlayer":
|
||||
{
|
||||
break; /* todo: set LocalPlayer based on this */
|
||||
Game.LocalPlayer = order.Player;
|
||||
Game.chat.AddLine(Pair.New(order.Player.PlayerName, "is now YOU."));
|
||||
break;
|
||||
}
|
||||
case "StartGame":
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user