diff --git a/source/platform/pdrop.cpp b/source/platform/pdrop.cpp index 4c32d8d6f..c29866e93 100644 --- a/source/platform/pdrop.cpp +++ b/source/platform/pdrop.cpp @@ -19,27 +19,38 @@ #include "game\game.h" #endif +#ifndef __PAD_VIBE_H__ +#include "pad\vibe.h" +#endif + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void CNpcDropPlatform::postInit() { - m_dropHit = false; + m_dropHit = true; CNpcPlatform::postInit(); + + m_initTimer = 2 * GameState::getOneSecondInFrames(); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void CNpcDropPlatform::processMovement( int _frames ) { + if ( m_initTimer > 0 ) + { + m_initTimer -= _frames; + } + s32 moveY = m_speed * _frames; - s32 groundHeight = CGameScene::getCollision()->getHeightFromGround( Pos.vx, Pos.vy + moveY, 16 ); + s32 groundHeight = CGameScene::getCollision()->getHeightFromGround( Pos.vx, Pos.vy, moveY ); if ( groundHeight < moveY ) { - if ( !m_dropHit ) + if ( !m_dropHit && m_initTimer <= 0 ) { if( m_soundId != NOT_PLAYING ) { @@ -47,6 +58,9 @@ void CNpcDropPlatform::processMovement( int _frames ) } m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__FALLING_ROCK_LAND, true ); + + CGameScene::setCameraShake(0,8); + CPadVibrationManager::setVibration(0,CPadVibrationManager::VIBE_MEDIUM); } m_dropHit = true; diff --git a/source/platform/pdrop.h b/source/platform/pdrop.h index 25ff038e1..eea929ff8 100644 --- a/source/platform/pdrop.h +++ b/source/platform/pdrop.h @@ -27,6 +27,7 @@ protected: void processMovement( int _frames ); u8 m_dropHit; + s32 m_initTimer; }; #endif \ No newline at end of file