From e7543f28dffa2e914c208574d8c5cad7304fa81c Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Mon, 20 Jun 2011 00:02:02 +1200 Subject: [PATCH] Fix naming of Player.PlayerReference. --- OpenRA.Game/Network/UnitOrders.cs | 2 +- OpenRA.Game/Player.cs | 4 ++-- OpenRA.Mods.RA/CreateMPPlayers.cs | 4 ++-- OpenRA.Mods.RA/MPStartLocations.cs | 2 +- OpenRA.Mods.RA/SpawnMPUnits.cs | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/OpenRA.Game/Network/UnitOrders.cs b/OpenRA.Game/Network/UnitOrders.cs index 31ce9c6819..37f8e22bb8 100755 --- a/OpenRA.Game/Network/UnitOrders.cs +++ b/OpenRA.Game/Network/UnitOrders.cs @@ -23,7 +23,7 @@ namespace OpenRA.Network /* todo: this is still a hack. * the cases we're trying to avoid are the extra players on the host's client -- Neutral, other MapPlayers,..*/ return world.Players.FirstOrDefault( - p => (p.ClientIndex == c.Index && p.PlayerRef.Playable)); + p => (p.ClientIndex == c.Index && p.PlayerReference.Playable)); } public static void ProcessOrder(OrderManager orderManager, World world, int clientId, Order order) diff --git a/OpenRA.Game/Player.cs b/OpenRA.Game/Player.cs index 4a9d64d614..5634352c35 100644 --- a/OpenRA.Game/Player.cs +++ b/OpenRA.Game/Player.cs @@ -33,7 +33,7 @@ namespace OpenRA public readonly CountryInfo Country; public readonly bool NonCombatant = false; public readonly int ClientIndex; - public readonly PlayerReference PlayerRef; + public readonly PlayerReference PlayerReference; public bool IsBot; public Shroud Shroud { get { return World.LocalShroud; }} @@ -43,7 +43,7 @@ namespace OpenRA { World = world; InternalName = pr.Name; - PlayerRef = pr; + PlayerReference = pr; string botType = null; // Real player or host-created bot diff --git a/OpenRA.Mods.RA/CreateMPPlayers.cs b/OpenRA.Mods.RA/CreateMPPlayers.cs index 6fdc364c48..7fb46573e8 100644 --- a/OpenRA.Mods.RA/CreateMPPlayers.cs +++ b/OpenRA.Mods.RA/CreateMPPlayers.cs @@ -55,9 +55,9 @@ namespace OpenRA.Mods.RA if (p == q) return Stance.Ally; // Stances set via PlayerReference - if (p.PlayerRef.Allies.Contains(q.InternalName)) + if (p.PlayerReference.Allies.Contains(q.InternalName)) return Stance.Ally; - if (p.PlayerRef.Enemies.Contains(q.InternalName)) + if (p.PlayerReference.Enemies.Contains(q.InternalName)) return Stance.Enemy; // Stances set via lobby teams diff --git a/OpenRA.Mods.RA/MPStartLocations.cs b/OpenRA.Mods.RA/MPStartLocations.cs index ec05dc7aa4..73a3aa4e01 100755 --- a/OpenRA.Mods.RA/MPStartLocations.cs +++ b/OpenRA.Mods.RA/MPStartLocations.cs @@ -59,7 +59,7 @@ namespace OpenRA.Mods.RA static Player FindPlayerInSlot(World world, string pr) { - return world.Players.FirstOrDefault(p => p.PlayerRef.Name == pr); + return world.Players.FirstOrDefault(p => p.PlayerReference.Name == pr); } static int2 ChooseSpawnPoint(World world, List available, List taken) diff --git a/OpenRA.Mods.RA/SpawnMPUnits.cs b/OpenRA.Mods.RA/SpawnMPUnits.cs index b5d2653413..4076b34ffb 100644 --- a/OpenRA.Mods.RA/SpawnMPUnits.cs +++ b/OpenRA.Mods.RA/SpawnMPUnits.cs @@ -25,8 +25,8 @@ namespace OpenRA.Mods.RA void SpawnUnitsForPlayer(Player p, int2 sp) { - if (!p.PlayerRef.DefaultStartingUnits) - return; /* they don't want an mcv, the map provides something else for them OR it is a spectator. */ + if (!p.PlayerReference.DefaultStartingUnits) + return; /* they don't want an mcv, the map provides something else for them */ p.World.CreateActor("mcv", new TypeDictionary {