(External)Capturable are now conditional

This commit is contained in:
Forcecore
2017-10-21 16:34:24 +00:00
committed by Pavel Penev
parent a7620c97f0
commit c762453607
6 changed files with 58 additions and 18 deletions

View File

@@ -36,12 +36,12 @@ namespace OpenRA.Mods.Common.Activities
protected override bool CanReserve(Actor self)
{
return !capturable.BeingCaptured && capturable.Info.CanBeTargetedBy(self, actor.Owner);
return !capturable.BeingCaptured && capturable.CanBeTargetedBy(self, actor.Owner);
}
protected override void OnInside(Actor self)
{
if (actor.IsDead || capturable.BeingCaptured)
if (actor.IsDead || capturable.BeingCaptured || capturable.IsTraitDisabled)
return;
if (building != null && !building.Lock())