Fix naming of Player.PlayerReference.

This commit is contained in:
Paul Chote
2011-06-20 00:02:02 +12:00
parent 91b31b1981
commit e7543f28df
5 changed files with 8 additions and 8 deletions

View File

@@ -23,7 +23,7 @@ namespace OpenRA.Network
/* todo: this is still a hack. /* 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,..*/ * the cases we're trying to avoid are the extra players on the host's client -- Neutral, other MapPlayers,..*/
return world.Players.FirstOrDefault( 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) public static void ProcessOrder(OrderManager orderManager, World world, int clientId, Order order)

View File

@@ -33,7 +33,7 @@ namespace OpenRA
public readonly CountryInfo Country; public readonly CountryInfo Country;
public readonly bool NonCombatant = false; public readonly bool NonCombatant = false;
public readonly int ClientIndex; public readonly int ClientIndex;
public readonly PlayerReference PlayerRef; public readonly PlayerReference PlayerReference;
public bool IsBot; public bool IsBot;
public Shroud Shroud { get { return World.LocalShroud; }} public Shroud Shroud { get { return World.LocalShroud; }}
@@ -43,7 +43,7 @@ namespace OpenRA
{ {
World = world; World = world;
InternalName = pr.Name; InternalName = pr.Name;
PlayerRef = pr; PlayerReference = pr;
string botType = null; string botType = null;
// Real player or host-created bot // Real player or host-created bot

View File

@@ -55,9 +55,9 @@ namespace OpenRA.Mods.RA
if (p == q) return Stance.Ally; if (p == q) return Stance.Ally;
// Stances set via PlayerReference // Stances set via PlayerReference
if (p.PlayerRef.Allies.Contains(q.InternalName)) if (p.PlayerReference.Allies.Contains(q.InternalName))
return Stance.Ally; return Stance.Ally;
if (p.PlayerRef.Enemies.Contains(q.InternalName)) if (p.PlayerReference.Enemies.Contains(q.InternalName))
return Stance.Enemy; return Stance.Enemy;
// Stances set via lobby teams // Stances set via lobby teams

View File

@@ -59,7 +59,7 @@ namespace OpenRA.Mods.RA
static Player FindPlayerInSlot(World world, string pr) 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<int2> available, List<int2> taken) static int2 ChooseSpawnPoint(World world, List<int2> available, List<int2> taken)

View File

@@ -25,8 +25,8 @@ namespace OpenRA.Mods.RA
void SpawnUnitsForPlayer(Player p, int2 sp) void SpawnUnitsForPlayer(Player p, int2 sp)
{ {
if (!p.PlayerRef.DefaultStartingUnits) if (!p.PlayerReference.DefaultStartingUnits)
return; /* they don't want an mcv, the map provides something else for them OR it is a spectator. */ return; /* they don't want an mcv, the map provides something else for them */
p.World.CreateActor("mcv", new TypeDictionary p.World.CreateActor("mcv", new TypeDictionary
{ {