Implement enter behaviour for building/bridge repair.

This commit is contained in:
Paul Chote
2015-11-23 21:36:48 +00:00
parent 1959820bc8
commit 5b99a0c2da
4 changed files with 16 additions and 8 deletions

View File

@@ -18,8 +18,8 @@ namespace OpenRA.Mods.Common.Activities
readonly Actor target;
readonly Health health;
public RepairBuilding(Actor self, Actor target)
: base(self, target, EnterBehaviour.Dispose)
public RepairBuilding(Actor self, Actor target, EnterBehaviour enterBehaviour)
: base(self, target, enterBehaviour)
{
this.target = target;
health = target.Trait<Health>();
@@ -34,8 +34,8 @@ namespace OpenRA.Mods.Common.Activities
{
if (health.DamageState == DamageState.Undamaged)
return;
target.InflictDamage(self, -health.MaxHP, null);
self.Dispose();
}
}
}