avoid observers being allied to world owning neutral players

This commit is contained in:
Matthias Mailänder
2015-08-05 22:06:45 +02:00
parent 0325f803ab
commit 6c45763d75

View File

@@ -137,8 +137,8 @@ namespace OpenRA
public Dictionary<Player, Stance> Stances = new Dictionary<Player, Stance>();
public bool IsAlliedWith(Player p)
{
// Observers are considered as allies
return p == null || Stances[p] == Stance.Ally || p.Spectating;
// Observers are considered allies to active combatants
return p == null || Stances[p] == Stance.Ally || (p.Spectating && !NonCombatant);
}
public void SetStance(Player target, Stance s)