Re-enabled repairtool character damage

This commit is contained in:
Regalis
2016-02-13 21:24:41 +02:00
parent 08f1d05507
commit 9b5e78fce4
4 changed files with 31 additions and 7 deletions
@@ -69,6 +69,13 @@ namespace Barotrauma
if (GameMain.DebugDraw && !isDead) aiController.DebugDraw(spriteBatch);
}
public override void AddDamage(CauseOfDeath causeOfDeath, float amount, IDamageable attacker)
{
base.AddDamage(causeOfDeath, amount, attacker);
if (attacker!=null) aiController.OnAttacked(attacker, amount);
}
public override AttackResult AddDamage(IDamageable attacker, Vector2 position, Attack attack, float deltaTime, bool playSound = false)
{
AttackResult result = base.AddDamage(attacker, position, attack, deltaTime, playSound);