This commit is contained in:
Charles 2001-04-26 21:29:44 +00:00
parent 8744b10af4
commit 7fa8e5a852
10 changed files with 81 additions and 10 deletions

View file

@ -38,7 +38,7 @@ void CNpcSpiderCrabEnemy::postInit()
{
m_npcPath.setPathType( CNpcPath::PONG_PATH );
if ( m_layerCollision->getHeightFromGround( Pos.vx, Pos.vy, 16 ) < 0 )
if ( m_layerCollision->getHeightFromGround( Pos.vx, Pos.vy - 8, 16 ) <= 0 )
{
// starting off below ground, jump initially
@ -251,7 +251,7 @@ void CNpcSpiderCrabEnemy::processSpiderCrabInitJumpMovement( int _frames )
Pos.vy = m_base.vy - ( ( 50 * rsin( abs( m_extension ) << 4 ) ) >> 12 );
if ( m_extension > 64 )
/*if ( m_extension > 64 )
{
// check for collision on the way back down
@ -262,6 +262,11 @@ void CNpcSpiderCrabEnemy::processSpiderCrabInitJumpMovement( int _frames )
}
if ( completed || collision )
{
m_state = SPIDER_CRAB_DEFAULT;
}*/
if ( m_extension > 64 )
{
m_state = SPIDER_CRAB_DEFAULT;
}
@ -319,3 +324,20 @@ void CNpcSpiderCrabEnemy::processMovementModifier( int _frames, s32 distX, s32 d
m_drawRotation = heading;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcSpiderCrabEnemy::processEnemyCollision( CThing *thisThing )
{
if ( m_state != SPIDER_CRAB_INIT_JUMP )
{
CNpcEnemy::processEnemyCollision( thisThing );
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
u8 CNpcSpiderCrabEnemy::canCollideWithEnemy()
{
return( m_state != SPIDER_CRAB_INIT_JUMP );
}