use common version of AreMutualAllies in PC

This commit is contained in:
Chris Forbes
2011-07-09 17:02:11 +12:00
committed by Paul Chote
parent 85bb56fd8f
commit 47e25bb5a1

View File

@@ -129,12 +129,6 @@ namespace OpenRA.Mods.RA
});
}
static bool AreMutualAllies(Player a, Player b)
{
return a.Stances[b] == Stance.Ally &&
b.Stances[a] == Stance.Ally;
}
bool CanBeCapturedBy(Actor a)
{
return a.HasTrait<ProximityCaptor>() && a.Trait<ProximityCaptor>().HasAny(Info.CaptorTypes);
@@ -152,7 +146,7 @@ namespace OpenRA.Mods.RA
return UnitsInRange().Where(a => a.Owner != originalOwner)
.Where(a => a.Owner != currentOwner)
.Where(a => CanBeCapturedBy(a))
.All(a => AreMutualAllies(a.Owner, currentOwner));
.All(a => WorldUtils.AreMutualAllies(a.Owner, currentOwner));
}
// TODO exclude other NeutralActor that arent permanent