Building capture eva + wtf on silo capture

This commit is contained in:
Paul Chote
2010-07-23 22:28:46 +12:00
parent 31cb2081c6
commit 52c8c93b30
9 changed files with 20 additions and 12 deletions

View File

@@ -27,17 +27,16 @@ namespace OpenRA.Mods.RA.Activities
target.World.AddFrameEndTask(w =>
{
// momentarily remove from world so the ownership queries don't get confused
var oldOwner = target.Owner;
w.Remove(target);
target.Owner = self.Owner;
w.Add(target);
foreach (var t in target.traits.WithInterface<INotifyCapture>())
t.OnCapture(target, self);
t.OnCapture(target, self, oldOwner, self.Owner);
w.Remove(self);
});
// the engineer is sacrificed.
self.World.AddFrameEndTask(w => w.Remove(self));
return NextActivity;
}