From 250e50c01e5ef9ed6eb8ec77f495f0150a8d5c32 Mon Sep 17 00:00:00 2001 From: LogicParrot Date: Mon, 18 Apr 2016 21:58:57 +0300 Subject: Fix issues below y = 0 --- src/Entities/Entity.cpp | 6 ++++++ src/Entities/Pickup.cpp | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Entities') 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; - } } -- cgit v1.2.3