This commit is contained in:
Charles 2001-07-12 20:15:10 +00:00
parent 948f32ea2e
commit e399f8ad11
8 changed files with 52 additions and 4 deletions

View File

@ -421,7 +421,6 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
false,
true,
CSoundMediator::SFX_PRICKLY_BUG_DEFEATED,
//CSoundMediator::NUM_SFXIDS,
CSoundMediator::SFX_PRICKLY_BUG_MOVE,
true,
},
@ -525,7 +524,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
false,
false,
true,
CSoundMediator::NUM_SFXIDS,
CSoundMediator::SFX_PRICKLY_BUG_DEFEATED,
CSoundMediator::NUM_SFXIDS,
true,
},

View File

@ -141,10 +141,9 @@ bool CNpcSquidDartEnemy::processSensor()
if( m_soundId != NOT_PLAYING )
{
CSoundMediator::stopAndUnlockSfx( (xmPlayingId) m_soundId );
m_soundId = NOT_PLAYING;
}
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_SQUIDDART_ATTACK, true );
return( true );
}
else
@ -179,6 +178,11 @@ void CNpcSquidDartEnemy::processClose( int _frames )
}
Pos.vx += movement;
if( m_soundId != NOT_PLAYING )
{
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_SQUIDDART_ATTACK, true );
}
}
else
{

View File

@ -169,6 +169,16 @@ void CNpcBouncingBarrelHazard::processMovement( int _frames )
Pos.vy = m_lastWaypoint.vy - ( ( abs( nextWaypoint.vy - m_lastWaypoint.vy ) * rsin( sineVal ) ) >> 12 );
}
int groundHeight = CGameScene::getCollision()->getHeightFromGround( Pos.vx, Pos.vy, 16 );
if ( groundHeight < 8 )
{
if ( m_soundId == NOT_PLAYING )
{
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__ACORN_LAND, true );
}
}
}
}
@ -215,6 +225,13 @@ void CNpcBouncingBarrelHazard::collidedWith( CThing *_thisThing )
player->takeDamage( DAMAGE__HIT_ENEMY );
}
if( m_soundId != NOT_PLAYING )
{
CSoundMediator::stopAndUnlockSfx( (xmPlayingId) m_soundId );
}
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__ACORN_LAND, true );
m_hitPlayer = true;
m_speed = -5;
}

View File

@ -211,6 +211,13 @@ void CNpcFallingHazard::collidedWith( CThing *_thisThing )
m_speed = -5;
m_bounceDir = getRnd() % 2;
if( m_soundId != NOT_PLAYING )
{
CSoundMediator::stopAndUnlockSfx( (xmPlayingId) m_soundId );
}
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__ACORN_LAND, true );
m_bouncePos = Pos;
break;

View File

@ -122,6 +122,7 @@ void CNpcBranchPlatform::processMovement( int _frames )
if ( m_angularVelocity > 6 && newAngle < -20 )
{
player->springPlayerUp();
CSoundMediator::playSfx(CSoundMediator::SFX_SPONGEBOB_BUTTBOUNCE);
}
}
else
@ -129,6 +130,7 @@ void CNpcBranchPlatform::processMovement( int _frames )
if ( m_angularVelocity < -6 && newAngle > 20 )
{
player->springPlayerUp();
CSoundMediator::playSfx(CSoundMediator::SFX_SPONGEBOB_BUTTBOUNCE);
}
}

View File

@ -50,6 +50,7 @@ void CNpcJellyfishPlatform::postInit()
m_vertScale = 0;
m_dipCount = 0;
m_dipOffset = 0;
m_contactTimeout = 0;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -85,6 +86,16 @@ void CNpcJellyfishPlatform::collidedWith( CThing *_thisThing )
if( height == 0 )
{
m_contact = true;
if ( m_contactTimeout <= 0 )
{
if ( m_soundId == NOT_PLAYING )
{
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_LAND_ON_JELLYFISH, true );
}
}
m_contactTimeout = 2;
}
}
}
@ -115,6 +126,11 @@ void CNpcJellyfishPlatform::think( int _frames )
m_vertScale += 10;
}*/
if ( m_contactTimeout > 0 )
{
m_contactTimeout--;
}
if ( m_contact )
{
if ( m_dipCount < GameState::getOneSecondInFrames() )

View File

@ -29,6 +29,7 @@ protected:
s32 m_vertScale;
u8 m_dipCount;
s32 m_dipOffset;
s32 m_contactTimeout;
};
#endif

View File

@ -74,6 +74,8 @@ void CPlayerStateSoakUp::enter(CPlayerModeBase *_playerMode)
_playerMode->zeroMoveVelocity();
_playerMode->setAnimNo(ANIM_SPONGEBOB_DONOTDRAW);
m_breatheDelayFrames=0;
CSoundMediator::playSfx(CSoundMediator::SFX_SPLASH);
}