summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-04-18 22:20:28 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-04-18 22:20:28 +0200
commit931ee84685b979a1b40e8078425600044ce86429 (patch)
tree3e7de5a5d1187baf2d714bd815b09d16ea0bdf67 /src/Entities
parentMerge pull request #3146 from LogicParrot/snowFix (diff)
parentFix issues below y = 0 (diff)
downloadcuberite-931ee84685b979a1b40e8078425600044ce86429.tar
cuberite-931ee84685b979a1b40e8078425600044ce86429.tar.gz
cuberite-931ee84685b979a1b40e8078425600044ce86429.tar.bz2
cuberite-931ee84685b979a1b40e8078425600044ce86429.tar.lz
cuberite-931ee84685b979a1b40e8078425600044ce86429.tar.xz
cuberite-931ee84685b979a1b40e8078425600044ce86429.tar.zst
cuberite-931ee84685b979a1b40e8078425600044ce86429.zip
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/Entity.cpp6
-rw-r--r--src/Entities/Pickup.cpp6
2 files changed, 6 insertions, 6 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());
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp
index bdb9128dc..69bb981e6 100644
--- a/src/Entities/Pickup.cpp
+++ b/src/Entities/Pickup.cpp
@@ -182,12 +182,6 @@ void cPickup::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
Destroy(true);
return;
}
-
- if (GetPosY() < VOID_BOUNDARY) // Out of this world and no more visible!
- {
- Destroy(true);
- return;
- }
}