Added INotifyKilled to AttackBomber

This commit is contained in:
Ian T. Jacobsen
2014-02-24 19:43:01 +00:00
parent 6d4eada679
commit 394e230545

View File

@@ -28,7 +28,7 @@ namespace OpenRA.Mods.RA
public override object Create(ActorInitializer init) { return new AttackBomber(init.self, this); }
}
class AttackBomber : AttackBase, ISync
class AttackBomber : AttackBase, ISync, INotifyKilled
{
AttackBomberInfo info;
Actor camera;
@@ -92,6 +92,15 @@ namespace OpenRA.Mods.RA
public void SetTarget(WPos pos) { target = Target.FromPos(pos); }
public void Killed(Actor self, AttackInfo e)
{
if (this.camera != null)
{
self.World.Remove(this.camera);
this.camera = null;
}
}
public override Activity GetAttackActivity(Actor self, Target newTarget, bool allowMove)
{
// TODO: Player controlled units want this too!