Fix #2070; cannot sell when building is being captured

This commit is contained in:
Curtis Shmyr
2012-04-30 02:43:02 -06:00
committed by Chris Forbes
parent 15dcd6a9f6
commit 45f5c054d5
2 changed files with 7 additions and 0 deletions

View File

@@ -19,6 +19,9 @@ namespace OpenRA.Mods.RA.Activities
{
public override Activity Tick(Actor self)
{
var capturing = self.TraitOrDefault<Capturable>();
if (capturing != null && capturing.CaptureInProgress) return NextActivity;
var h = self.TraitOrDefault<Health>();
var si = self.Info.Traits.Get<SellableInfo>();
var pr = self.Owner.PlayerActor.Trait<PlayerResources>();