Remove unused parameter from Player's constructor

This commit is contained in:
penev92
2015-07-15 04:58:50 +03:00
parent 317576a9bb
commit 479eb307d6
3 changed files with 7 additions and 7 deletions

View File

@@ -80,7 +80,7 @@ namespace OpenRA
return factions.FirstOrDefault(f => f.InternalName == factionName) ?? factions.First(); return factions.FirstOrDefault(f => f.InternalName == factionName) ?? factions.First();
} }
public Player(World world, Session.Client client, Session.Slot slot, PlayerReference pr) public Player(World world, Session.Client client, PlayerReference pr)
{ {
string botType; string botType;

View File

@@ -26,28 +26,28 @@ namespace OpenRA.Mods.Common.Traits
// Create the unplayable map players -- neutral, shellmap, scripted, etc. // Create the unplayable map players -- neutral, shellmap, scripted, etc.
foreach (var kv in players.Where(p => !p.Value.Playable)) 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); w.AddPlayer(player);
if (kv.Value.OwnsWorld) if (kv.Value.OwnsWorld)
w.WorldActor.Owner = player; w.WorldActor.Owner = player;
} }
// Create the players which are bound through slots. // Create the regular playable players.
foreach (var kv in w.LobbyInfo.Slots) foreach (var kv in w.LobbyInfo.Slots)
{ {
var client = w.LobbyInfo.ClientInSlot(kv.Key); var client = w.LobbyInfo.ClientInSlot(kv.Key);
if (client == null) if (client == null)
continue; 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); w.AddPlayer(player);
if (client.Index == Game.LocalClientId) if (client.Index == Game.LocalClientId)
w.SetLocalPlayer(player.InternalName); w.SetLocalPlayer(player.InternalName);
} }
// create a player that is allied with everyone for shared observer shroud // Create a player that is allied with everyone for shared observer shroud.
w.AddPlayer(new Player(w, null, null, new PlayerReference w.AddPlayer(new Player(w, null, new PlayerReference
{ {
Name = "Everyone", Name = "Everyone",
NonCombatant = true, NonCombatant = true,

View File

@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits
Players = new MapPlayers(w.Map.PlayerDefinitions); Players = new MapPlayers(w.Map.PlayerDefinitions);
var worldOwner = Players.Players.Select(kvp => kvp.Value).First(p => !p.Playable && p.OwnsWorld); 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) public void WorldLoaded(World world, WorldRenderer wr)