diff --git a/source/platform/pfishhk.cpp b/source/platform/pfishhk.cpp index 14543bc01..1ff2cb066 100644 --- a/source/platform/pfishhk.cpp +++ b/source/platform/pfishhk.cpp @@ -35,6 +35,7 @@ void CNpcFishHookPlatform::postInit() CNpcPlatform::postInit(); m_isMoving = false; + m_isResetting = false; m_isShuttingDown = false; m_lineBase.vx = Pos.vx; m_lineBase.vy = 0; @@ -59,14 +60,26 @@ void CNpcFishHookPlatform::processMovement( int _frames ) { if ( m_isMoving ) { - Pos.vy -= m_speed * _frames; - - if ( Pos.vy < 0 ) + if ( m_isResetting ) { - m_isActive = false; - m_timer = getRnd() % ( 4 * GameState::getOneSecondInFrames() ); - m_timerType = NPC_PLATFORM_TIMER_RESPAWN; - m_isMoving = false; + Pos.vy += 2 * _frames; + + if ( Pos.vy > m_base.vy ) + { + Pos.vy = m_base.vy; + + m_isResetting = false; + m_isMoving = false; + } + } + else + { + Pos.vy -= m_speed * _frames; + + if ( Pos.vy < 0 ) + { + m_isResetting = true; + } } } } diff --git a/source/platform/pfishhk.h b/source/platform/pfishhk.h index bacd5bbc4..52f097423 100644 --- a/source/platform/pfishhk.h +++ b/source/platform/pfishhk.h @@ -28,6 +28,7 @@ protected: virtual void processMovement( int _frames ); u8 m_isMoving; + u8 m_isResetting; DVECTOR m_lineBase; };