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/MobPointer.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/MobPointer.cpp')
-rw-r--r-- | src/Mobs/MobPointer.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Mobs/MobPointer.cpp b/src/Mobs/MobPointer.cpp index b755e3cdf..6e3bccee1 100644 --- a/src/Mobs/MobPointer.cpp +++ b/src/Mobs/MobPointer.cpp @@ -1,5 +1,8 @@ +#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules + #include "../Entities/Pawn.h" #include "MobPointer.h" +#include "../World.h" cMobPointer::cMobPointer(cPawn * a_Pointer) : m_Pointer(a_Pointer) { @@ -62,11 +65,11 @@ void cMobPointer::operator=(cPawn * a_Pointer) -cPawn * cMobPointer::GetPointer() +cPawn * cMobPointer::GetPointer(cWorld * a_CurrentWorld) { if (m_Pointer != nullptr) { - if (!m_Pointer->IsTicking()) + if (!m_Pointer->IsTicking() || (m_Pointer->GetWorld() != a_CurrentWorld)) { m_Pointer = nullptr; } |