From eba8e8f33f84951b017c475e5c108978288244ac Mon Sep 17 00:00:00 2001 From: "Ian T. Jacobsen" Date: Tue, 4 Feb 2014 13:50:08 +0000 Subject: [PATCH] Added a blocking check to Production::CanUseExit --- OpenRA.Mods.RA/Production.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OpenRA.Mods.RA/Production.cs b/OpenRA.Mods.RA/Production.cs index aeb7b2754f..715a37c38f 100755 --- a/OpenRA.Mods.RA/Production.cs +++ b/OpenRA.Mods.RA/Production.cs @@ -124,6 +124,13 @@ namespace OpenRA.Mods.RA { var mobileInfo = producee.Traits.GetOrDefault(); + foreach (var blocker in self.World.ActorMap.GetUnitsAt(self.Location + s.ExitCell)) + { + // Notify the blocker that he's blocking our move: + foreach (var moveBlocked in blocker.TraitsImplementing()) + moveBlocked.OnNotifyBlockingMove(blocker, self); + } + return mobileInfo == null || mobileInfo.CanEnterCell(self.World, self, self.Location + s.ExitCell, self, true, true); }