summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-04-18 20:58:57 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-04-18 20:58:57 +0200
commit250e50c01e5ef9ed6eb8ec77f495f0150a8d5c32 (patch)
tree3e7de5a5d1187baf2d714bd815b09d16ea0bdf67 /src/Entities/Entity.cpp
parentMerge pull request #3146 from LogicParrot/snowFix (diff)
downloadcuberite-250e50c01e5ef9ed6eb8ec77f495f0150a8d5c32.tar
cuberite-250e50c01e5ef9ed6eb8ec77f495f0150a8d5c32.tar.gz
cuberite-250e50c01e5ef9ed6eb8ec77f495f0150a8d5c32.tar.bz2
cuberite-250e50c01e5ef9ed6eb8ec77f495f0150a8d5c32.tar.lz
cuberite-250e50c01e5ef9ed6eb8ec77f495f0150a8d5c32.tar.xz
cuberite-250e50c01e5ef9ed6eb8ec77f495f0150a8d5c32.tar.zst
cuberite-250e50c01e5ef9ed6eb8ec77f495f0150a8d5c32.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Entity.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 5dcef330a..30aa87f37 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -878,6 +878,12 @@ void cEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
m_InvulnerableTicks--;
}
+ if ((GetPosY() < 0) && (!IsPlayer()))
+ {
+ Destroy();
+ return;
+ }
+
if (m_AttachedTo != nullptr)
{
SetPosition(m_AttachedTo->GetPosition());