From 4e1c8453034a8ad336be44075397f15d2d296d45 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sat, 9 Jul 2011 16:53:33 +1200 Subject: [PATCH] add common version of AreMutualAllies to WorldUtils --- OpenRA.Game/WorldUtils.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenRA.Game/WorldUtils.cs b/OpenRA.Game/WorldUtils.cs index eabc41a32e..dc0beed76f 100755 --- a/OpenRA.Game/WorldUtils.cs +++ b/OpenRA.Game/WorldUtils.cs @@ -158,5 +158,11 @@ namespace OpenRA Log.Write("perf", text, x, dt * 1000, Game.LocalTick); }); } + + public static bool AreMutualAllies( Player a, Player b ) + { + return a.Stances[b] == Stance.Ally && + b.Stances[a] == Stance.Ally; + } } }