Remove unused parameter from Player's constructor
This commit is contained in:
@@ -26,28 +26,28 @@ namespace OpenRA.Mods.Common.Traits
|
||||
// Create the unplayable map players -- neutral, shellmap, scripted, etc.
|
||||
foreach (var kv in players.Where(p => !p.Value.Playable))
|
||||
{
|
||||
var player = new Player(w, null, null, kv.Value);
|
||||
var player = new Player(w, null, kv.Value);
|
||||
w.AddPlayer(player);
|
||||
if (kv.Value.OwnsWorld)
|
||||
w.WorldActor.Owner = player;
|
||||
}
|
||||
|
||||
// Create the players which are bound through slots.
|
||||
// Create the regular playable players.
|
||||
foreach (var kv in w.LobbyInfo.Slots)
|
||||
{
|
||||
var client = w.LobbyInfo.ClientInSlot(kv.Key);
|
||||
if (client == null)
|
||||
continue;
|
||||
|
||||
var player = new Player(w, client, kv.Value, players[kv.Value.PlayerReference]);
|
||||
var player = new Player(w, client, players[kv.Value.PlayerReference]);
|
||||
w.AddPlayer(player);
|
||||
|
||||
if (client.Index == Game.LocalClientId)
|
||||
w.SetLocalPlayer(player.InternalName);
|
||||
}
|
||||
|
||||
// create a player that is allied with everyone for shared observer shroud
|
||||
w.AddPlayer(new Player(w, null, null, new PlayerReference
|
||||
// Create a player that is allied with everyone for shared observer shroud.
|
||||
w.AddPlayer(new Player(w, null, new PlayerReference
|
||||
{
|
||||
Name = "Everyone",
|
||||
NonCombatant = true,
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
Players = new MapPlayers(w.Map.PlayerDefinitions);
|
||||
|
||||
var worldOwner = Players.Players.Select(kvp => kvp.Value).First(p => !p.Playable && p.OwnsWorld);
|
||||
w.WorldActor.Owner = new Player(w, null, null, worldOwner);
|
||||
w.WorldActor.Owner = new Player(w, null, worldOwner);
|
||||
}
|
||||
|
||||
public void WorldLoaded(World world, WorldRenderer wr)
|
||||
|
||||
Reference in New Issue
Block a user