diff --git a/Graphics/levels/Chapter05/Level02/Level02.MEX b/Graphics/levels/Chapter05/Level02/Level02.MEX index 9438c31b9..1346b3e76 100644 Binary files a/Graphics/levels/Chapter05/Level02/Level02.MEX and b/Graphics/levels/Chapter05/Level02/Level02.MEX differ diff --git a/Graphics/levels/Chapter05/Level02/level02.Mep b/Graphics/levels/Chapter05/Level02/level02.Mep index f3921cb3a..51138677c 100644 Binary files a/Graphics/levels/Chapter05/Level02/level02.Mep and b/Graphics/levels/Chapter05/Level02/level02.Mep differ diff --git a/source/enemy/nscrab.cpp b/source/enemy/nscrab.cpp index f8780d4bd..854272024 100644 --- a/source/enemy/nscrab.cpp +++ b/source/enemy/nscrab.cpp @@ -45,6 +45,8 @@ void CNpcSpiderCrabEnemy::postInit() m_velocity = 5; m_state = SPIDER_CRAB_INIT_JUMP; + + m_initDelay = 2 * GameState::getOneSecondInFrames(); } else { @@ -63,7 +65,7 @@ bool CNpcSpiderCrabEnemy::processSensor() default: { - if ( abs( playerXDist ) < 64 ) + if ( abs( playerXDist ) < 64 && m_initDelay <= 0 ) { // only attack if within path extents @@ -321,6 +323,11 @@ void CNpcSpiderCrabEnemy::processMovement(int _frames) } else { + if ( m_initDelay > 0 ) + { + m_initDelay -= _frames; + } + processGenericFixedPathWalk( _frames, &moveX, &moveY ); if ( !m_animPlaying ) diff --git a/source/enemy/nscrab.h b/source/enemy/nscrab.h index 7ecdd1132..1f4c6c87c 100644 --- a/source/enemy/nscrab.h +++ b/source/enemy/nscrab.h @@ -34,6 +34,7 @@ protected: s32 m_attackDist; int m_jumpDelay; + int m_initDelay; enum NPC_SPIDER_CRAB_STATE { diff --git a/source/projectl/projectl.cpp b/source/projectl/projectl.cpp index 1e375ae13..63895c904 100644 --- a/source/projectl/projectl.cpp +++ b/source/projectl/projectl.cpp @@ -91,6 +91,8 @@ void CProjectile::init() m_yScale = ONE; m_shock = false; updateCollisionArea(); + m_highResX = 0; + m_highResY = 0; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -383,8 +385,20 @@ void CProjectile::think(int _frames) } else { - Pos.vx += ( _frames * m_speed * rcos( m_heading ) ) >> 12; - Pos.vy += ( _frames * m_speed * rsin( m_heading ) ) >> 12; + m_highResX += ( _frames * ( m_speed << 8 ) * rcos( m_heading ) ) >> 12; + m_highResY += ( _frames * ( m_speed << 8 ) * rsin( m_heading ) ) >> 12; + + if ( abs( m_highResX ) > 256 ) + { + Pos.vx += m_highResX >> 8; + m_highResX -= ( m_highResX >> 8 ) << 8; + } + + if ( abs( m_highResY ) > 256 ) + { + Pos.vy += m_highResY >> 8; + m_highResY -= ( m_highResY >> 8 ) << 8; + } } break; diff --git a/source/projectl/projectl.h b/source/projectl/projectl.h index d7fccdcaa..1964f0b12 100644 --- a/source/projectl/projectl.h +++ b/source/projectl/projectl.h @@ -90,6 +90,7 @@ protected: s16 m_xScale; s16 m_yScale; u8 m_shock; + s32 m_highResX, m_highResY; }; /*****************************************************************************/