NotifyBlocker extension method for Actor

This commit is contained in:
atimoschenkow
2015-01-10 12:01:29 +01:00
parent ae03fa9af5
commit cefd554a5e
4 changed files with 25 additions and 23 deletions

View File

@@ -68,11 +68,7 @@ namespace OpenRA.Mods.Common.Activities
var exitSubCell = ChooseExitSubCell(actor);
if (exitSubCell == null)
{
foreach (var blocker in BlockedExitCells(actor).SelectMany(p => self.World.ActorMap.GetUnitsAt(p)))
{
foreach (var nbm in blocker.TraitsImplementing<INotifyBlockingMove>())
nbm.OnNotifyBlockingMove(blocker, self);
}
self.NotifyBlocker(BlockedExitCells(actor));
return Util.SequenceActivities(new Wait(10), this);
}