diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-01-16 13:16:47 +0100 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-01-16 15:37:37 +0100 |
commit | 8c12227687454abe5bdd0b8796f84f15fd3817d8 (patch) | |
tree | 6ebcb9d63146b2626311220b69b0c311e2a74c94 /src/Mobs/Wolf.cpp | |
parent | Merge pull request #2875 from LogicParrot/fallDamage (diff) | |
download | cuberite-8c12227687454abe5bdd0b8796f84f15fd3817d8.tar cuberite-8c12227687454abe5bdd0b8796f84f15fd3817d8.tar.gz cuberite-8c12227687454abe5bdd0b8796f84f15fd3817d8.tar.bz2 cuberite-8c12227687454abe5bdd0b8796f84f15fd3817d8.tar.lz cuberite-8c12227687454abe5bdd0b8796f84f15fd3817d8.tar.xz cuberite-8c12227687454abe5bdd0b8796f84f15fd3817d8.tar.zst cuberite-8c12227687454abe5bdd0b8796f84f15fd3817d8.zip |
Diffstat (limited to 'src/Mobs/Wolf.cpp')
-rw-r--r-- | src/Mobs/Wolf.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Mobs/Wolf.cpp b/src/Mobs/Wolf.cpp index e074cfe2e..174fee9b1 100644 --- a/src/Mobs/Wolf.cpp +++ b/src/Mobs/Wolf.cpp @@ -73,8 +73,12 @@ bool cWolf::Attack(std::chrono::milliseconds a_Dt) -void cWolf::NearbyPlayerIsFighting(cPlayer * a_Player, cEntity * a_Opponent) +void cWolf::NearbyPlayerIsFighting(cPlayer * a_Player, cPawn * a_Opponent) { + if (a_Opponent == nullptr) + { + return; + } if ((m_Target == nullptr) && (a_Player->GetName() == m_OwnerName) && !IsSitting() && (a_Opponent->IsPawn())) { m_Target = a_Opponent; |