Remove the Stances dictionary

This commit is contained in:
abcdefg30
2020-09-26 16:49:10 +02:00
committed by Paul Chote
parent 718cf37146
commit ea3c7a3c34
3 changed files with 26 additions and 55 deletions

View File

@@ -229,8 +229,6 @@ namespace OpenRA
return "{0} ({1})".F(PlayerName, ClientIndex);
}
public Dictionary<Player, PlayerRelationship> Stances = new Dictionary<Player, PlayerRelationship>();
public PlayerRelationship RelationshipWith(Player other)
{
if (this == other)
@@ -240,7 +238,13 @@ namespace OpenRA
if (other == null || other.Spectating)
return NonCombatant ? PlayerRelationship.Neutral : PlayerRelationship.Ally;
return Stances[other];
if (AlliedPlayersMask.Overlaps(other.PlayerMask))
return PlayerRelationship.Ally;
if (EnemyPlayersMask.Overlaps(other.PlayerMask))
return PlayerRelationship.Enemy;
return PlayerRelationship.Neutral;
}
public bool IsAlliedWith(Player p)