remove DeathWeapon; IExplodeModifier implemented for resource actors (and for V2, which was the original purpose)

This commit is contained in:
Chris Forbes
2010-07-05 17:43:20 +12:00
parent 68b63dc89e
commit 2ed8045736
6 changed files with 20 additions and 39 deletions

View File

@@ -44,7 +44,7 @@ namespace OpenRA.Traits
public virtual object Create(ActorInitializer init) { return new AttackBase(init.self); }
}
public class AttackBase : IIssueOrder, IResolveOrder, ITick
public class AttackBase : IIssueOrder, IResolveOrder, ITick, IExplodeModifier
{
[Sync] public Actor target;
@@ -77,6 +77,8 @@ namespace OpenRA.Traits
return true;
}
public bool ShouldExplode(Actor self) { return !IsReloading(); }
public bool IsReloading()
{
return (primaryFireDelay > 0) || (secondaryFireDelay > 0);