summaryrefslogtreecommitdiffstats
path: root/src/Entities/Pickup.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-09-03 13:31:27 +0200
committerGitHub <noreply@github.com>2016-09-03 13:31:27 +0200
commit90be4e7efdb455dc4bf4e150c403586a5c73d3f1 (patch)
tree4538de89307638a25566f4425e4f3b2333dd7520 /src/Entities/Pickup.cpp
parentImprove cPlayer::DoMoveToWorld (#3113) (diff)
downloadcuberite-90be4e7efdb455dc4bf4e150c403586a5c73d3f1.tar
cuberite-90be4e7efdb455dc4bf4e150c403586a5c73d3f1.tar.gz
cuberite-90be4e7efdb455dc4bf4e150c403586a5c73d3f1.tar.bz2
cuberite-90be4e7efdb455dc4bf4e150c403586a5c73d3f1.tar.lz
cuberite-90be4e7efdb455dc4bf4e150c403586a5c73d3f1.tar.xz
cuberite-90be4e7efdb455dc4bf4e150c403586a5c73d3f1.tar.zst
cuberite-90be4e7efdb455dc4bf4e150c403586a5c73d3f1.zip
Diffstat (limited to 'src/Entities/Pickup.cpp')
-rw-r--r--src/Entities/Pickup.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp
index 69bb981e6..12d535f84 100644
--- a/src/Entities/Pickup.cpp
+++ b/src/Entities/Pickup.cpp
@@ -116,6 +116,11 @@ void cPickup::SpawnOn(cClientHandle & a_Client)
void cPickup::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
super::Tick(a_Dt, a_Chunk);
+ if (!IsTicking())
+ {
+ // The base class tick destroyed us
+ return;
+ }
BroadcastMovementUpdate(); // Notify clients of position
m_Timer += a_Dt;