take lock while capture in progress

This commit is contained in:
Chris Forbes
2012-09-13 06:52:27 +12:00
parent 952e277d35
commit c253e59c57
2 changed files with 10 additions and 2 deletions

View File

@@ -40,7 +40,8 @@ namespace OpenRA.Mods.RA.Activities
if (sellable != null && sellable.Selling)
return NextActivity;
target.Trait<Capturable>().BeginCapture(target, self);
if (!target.Trait<Capturable>().BeginCapture(target, self))
return NextActivity;
var capturesInfo = self.Info.Traits.Get<CapturesInfo>();
if (capturesInfo != null && capturesInfo.WastedAfterwards)