(cf99ace8a) Fix bots entering the combat state if taking damage from falling etc.

This commit is contained in:
Joonas Rikkonen
2019-04-05 16:21:12 +03:00
parent 69c414dfc9
commit a3ff707a31
3 changed files with 2 additions and 141 deletions
@@ -289,6 +289,8 @@ namespace Barotrauma
public override void OnAttacked(Character attacker, AttackResult attackResult)
{
// Damage from falling etc.
if (Character.LastDamageSource == null) { return; }
float damage = attackResult.Damage;
if (damage <= 0) { return; }
if (attacker == null || attacker.IsDead || attacker.Removed)