diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-08-30 10:29:29 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-08-30 10:29:29 +0200 |
commit | 7f7c743204bb7fddfd439bcfa84943ba0fe31755 (patch) | |
tree | acd72b62c5bc33dbb45b9ac1b5853f9970d7a45c /src/Mobs/Behaviors/BehaviorAggressive.cpp | |
parent | targetStrikeRange (diff) | |
download | cuberite-7f7c743204bb7fddfd439bcfa84943ba0fe31755.tar cuberite-7f7c743204bb7fddfd439bcfa84943ba0fe31755.tar.gz cuberite-7f7c743204bb7fddfd439bcfa84943ba0fe31755.tar.bz2 cuberite-7f7c743204bb7fddfd439bcfa84943ba0fe31755.tar.lz cuberite-7f7c743204bb7fddfd439bcfa84943ba0fe31755.tar.xz cuberite-7f7c743204bb7fddfd439bcfa84943ba0fe31755.tar.zst cuberite-7f7c743204bb7fddfd439bcfa84943ba0fe31755.zip |
Diffstat (limited to 'src/Mobs/Behaviors/BehaviorAggressive.cpp')
-rw-r--r-- | src/Mobs/Behaviors/BehaviorAggressive.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Mobs/Behaviors/BehaviorAggressive.cpp b/src/Mobs/Behaviors/BehaviorAggressive.cpp index ccea67eb4..b55c1b476 100644 --- a/src/Mobs/Behaviors/BehaviorAggressive.cpp +++ b/src/Mobs/Behaviors/BehaviorAggressive.cpp @@ -34,5 +34,6 @@ void cBehaviorAggressive::PreTick(std::chrono::milliseconds a_Dt, cChunk & a_Chu cPawn * cBehaviorAggressive::FindNewTarget() { cPlayer * Closest = m_Parent->GetNearestPlayer(); + if (!Closest->CanMobsTarget()) return nullptr; return Closest; // May be null } |