summaryrefslogtreecommitdiffstats
path: root/src/Entities/ExpOrb.cpp
diff options
context:
space:
mode:
authorbibo38 <bibo38@users.noreply.github.com>2016-10-12 14:38:45 +0200
committerMattes D <github@xoft.cz>2016-10-12 14:38:45 +0200
commitcb640ffea4a51a10db2e379ada8dc0487378ba09 (patch)
tree780ff243f439c9663b2f88e5df2805cc503f4f1d /src/Entities/ExpOrb.cpp
parentFixed cProjectileEntity double destroy bug (#3397) (diff)
downloadcuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar
cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.gz
cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.bz2
cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.lz
cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.xz
cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.zst
cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/ExpOrb.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Entities/ExpOrb.cpp b/src/Entities/ExpOrb.cpp
index f51bbb300..290f9e665 100644
--- a/src/Entities/ExpOrb.cpp
+++ b/src/Entities/ExpOrb.cpp
@@ -45,7 +45,7 @@ void cExpOrb::SpawnOn(cClientHandle & a_Client)
void cExpOrb::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
cPlayer * a_ClosestPlayer(m_World->FindClosestPlayer(Vector3f(GetPosition()), 5));
- if (a_ClosestPlayer != nullptr)
+ if ((a_ClosestPlayer != nullptr) && (!a_ClosestPlayer->IsGameModeSpectator()))
{
Vector3f a_PlayerPos(a_ClosestPlayer->GetPosition());
a_PlayerPos.y++;