From 47e25bb5a1bf8c59f4ac070ca9d701e2837b7167 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sat, 9 Jul 2011 17:02:11 +1200 Subject: [PATCH] use common version of AreMutualAllies in PC --- OpenRA.Mods.RA/ProximityCapturable.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/OpenRA.Mods.RA/ProximityCapturable.cs b/OpenRA.Mods.RA/ProximityCapturable.cs index 4696062bc0..192992cfbd 100644 --- a/OpenRA.Mods.RA/ProximityCapturable.cs +++ b/OpenRA.Mods.RA/ProximityCapturable.cs @@ -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() && a.Trait().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