From 5177f930ffb221c302777ce8787625237356df0b Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 19 Jun 2001 20:21:26 +0000 Subject: [PATCH] --- source/platform/pbubble.cpp | 9 +++++++++ source/platform/pfallnor.cpp | 11 +++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/source/platform/pbubble.cpp b/source/platform/pbubble.cpp index db2471371..de21a31a6 100644 --- a/source/platform/pbubble.cpp +++ b/source/platform/pbubble.cpp @@ -97,6 +97,15 @@ void CNpcBubblePlatform::processMovement( int _frames ) m_pop = true; } } + + DVECTOR offset = CLevel::getCameraPos(); + + s32 yPos = Pos.vy - offset.vy; + + if ( yPos < 0 ) + { + setToShutdown(); + } } } diff --git a/source/platform/pfallnor.cpp b/source/platform/pfallnor.cpp index 3da917bf4..8c9684ad4 100644 --- a/source/platform/pfallnor.cpp +++ b/source/platform/pfallnor.cpp @@ -48,13 +48,13 @@ void CNpcFallingNoRespawnPlatform::processMovement( int _frames ) s32 distX, distY, heading; bool pathComplete; + DVECTOR offset = CLevel::getCameraPos(); + if ( m_spinFinish ) { m_rotation += 64 * _frames; m_rotation &= 4095; - DVECTOR offset = CLevel::getCameraPos(); - if ( m_bounceDir ) { Pos.vx += 2 * _frames; @@ -109,6 +109,13 @@ void CNpcFallingNoRespawnPlatform::processMovement( int _frames ) } } } + + s32 yPos = Pos.vy - offset.vy; + + if ( yPos > VidGetScrH() + 100 ) + { + setToShutdown(); + } } Pos.vx += moveX;