summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Pig.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-09-05 15:05:54 +0200
committerMattes D <github@xoft.cz>2016-09-05 15:05:54 +0200
commitf7029eddd4120f672c59a4b3a4395832f4de8863 (patch)
tree81c93ca7c5c03ebdde2401e86dd8c02665710384 /src/Mobs/Pig.cpp
parentPluginLua: Removed unneeded assignment. (diff)
parentConfigurable dirty unused chunk cap to avoid RAM overuse (#3359) (diff)
downloadcuberite-f7029eddd4120f672c59a4b3a4395832f4de8863.tar
cuberite-f7029eddd4120f672c59a4b3a4395832f4de8863.tar.gz
cuberite-f7029eddd4120f672c59a4b3a4395832f4de8863.tar.bz2
cuberite-f7029eddd4120f672c59a4b3a4395832f4de8863.tar.lz
cuberite-f7029eddd4120f672c59a4b3a4395832f4de8863.tar.xz
cuberite-f7029eddd4120f672c59a4b3a4395832f4de8863.tar.zst
cuberite-f7029eddd4120f672c59a4b3a4395832f4de8863.zip
Diffstat (limited to 'src/Mobs/Pig.cpp')
-rw-r--r--src/Mobs/Pig.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Mobs/Pig.cpp b/src/Mobs/Pig.cpp
index b67b29d87..6b420b235 100644
--- a/src/Mobs/Pig.cpp
+++ b/src/Mobs/Pig.cpp
@@ -85,6 +85,11 @@ void cPig::OnRightClicked(cPlayer & a_Player)
void cPig::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
super::Tick(a_Dt, a_Chunk);
+ if (!IsTicking())
+ {
+ // The base class tick destroyed us
+ return;
+ }
// If the attachee player is holding a carrot-on-stick, let them drive this pig:
if (m_bIsSaddled && (m_Attachee != nullptr))