Determine stance for spectators based on shroud selection
This commit is contained in:
committed by
Paul Chote
parent
72c82cb080
commit
bd0738c5c4
@@ -225,7 +225,11 @@ namespace OpenRA
|
||||
public Dictionary<Player, Stance> Stances = new Dictionary<Player, Stance>();
|
||||
public bool IsAlliedWith(Player p)
|
||||
{
|
||||
// Observers are considered allies to active combatants
|
||||
// Current shroud selection is used to determine stance for spectators
|
||||
if (p != null && p.Spectating && !NonCombatant && p.World.RenderPlayer != null)
|
||||
return Stances[p.World.RenderPlayer] == Stance.Ally;
|
||||
|
||||
// Observers are considered allies if RenderPlayer property is null
|
||||
return p == null || Stances[p] == Stance.Ally || (p.Spectating && !NonCombatant);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user