diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Unit.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 35902b684af..da0a9a4ae4c 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -11510,6 +11510,9 @@ bool Unit::canAttack(Unit const* target, bool force) const { if (IsFriendlyTo(target)) return false; + if (GetTypeId()!=TYPEID_PLAYER) + if (!IsHostileTo(target)) + return false; } else if (!IsHostileTo(target)) return false; |