summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Sheep.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/Sheep.cpp')
-rw-r--r--src/Mobs/Sheep.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Mobs/Sheep.cpp b/src/Mobs/Sheep.cpp
index 7bca03e7e..b0fc68d44 100644
--- a/src/Mobs/Sheep.cpp
+++ b/src/Mobs/Sheep.cpp
@@ -88,6 +88,11 @@ void cSheep::OnRightClicked(cPlayer & a_Player)
void cSheep::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
super::Tick(a_Dt, a_Chunk);
+ if (!IsTicking())
+ {
+ // The base class tick destroyed us
+ return;
+ }
int PosX = POSX_TOINT;
int PosY = POSY_TOINT - 1;
int PosZ = POSZ_TOINT;