summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2017-07-02 07:39:19 +0200
committerLukas Pioch <lukas@zgow.de>2017-07-02 07:39:19 +0200
commitcf22bc4e60b418bf9260720ef8eaef79ac38308b (patch)
tree91cb11bb85a4a1165f0e5b143f6a04620c666440 /src/Entities
parentWhen right-clicking on a passive mob with 'his' spawn egg spawn a baby (diff)
downloadcuberite-cf22bc4e60b418bf9260720ef8eaef79ac38308b.tar
cuberite-cf22bc4e60b418bf9260720ef8eaef79ac38308b.tar.gz
cuberite-cf22bc4e60b418bf9260720ef8eaef79ac38308b.tar.bz2
cuberite-cf22bc4e60b418bf9260720ef8eaef79ac38308b.tar.lz
cuberite-cf22bc4e60b418bf9260720ef8eaef79ac38308b.tar.xz
cuberite-cf22bc4e60b418bf9260720ef8eaef79ac38308b.tar.zst
cuberite-cf22bc4e60b418bf9260720ef8eaef79ac38308b.zip
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/Entity.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 9ff57602e..90613faf3 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -911,7 +911,10 @@ void cEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
m_TicksSinceLastVoidDamage = 0;
}
- if (IsMob() || IsPlayer() || IsPickup() || IsExpOrb())
+ if (
+ IsMob() || IsPickup() || IsExpOrb() ||
+ (IsPlayer() && !((reinterpret_cast<cPlayer *>(this))->IsGameModeCreative() || (reinterpret_cast<cPlayer *>(this))->IsGameModeSpectator()))
+ )
{
DetectCacti();
}