diff --git a/source/enemy/npc.cpp b/source/enemy/npc.cpp index 3f32d8098..4ca6525fa 100644 --- a/source/enemy/npc.cpp +++ b/source/enemy/npc.cpp @@ -275,7 +275,7 @@ void CNpcEnemy::init() m_drawOffset.vx = 0; m_drawOffset.vy = -( ofs.vy >> 1 ); - setCollisionCentreOffset( 0, -( ofs.vy >> 1 ) ); + setCollisionCentreOffset( m_drawOffset.vx, m_drawOffset.vy ); m_positionHistory = NULL; } @@ -1372,8 +1372,8 @@ void CNpcEnemy::render() //renderPos.vx = ( Pos.vx + m_drawOffset.vx - offset.vx - ( VidGetScrW() >> 1 ) );// * 20; //renderPos.vy = ( Pos.vy + m_drawOffset.vy - offset.vy - ( VidGetScrH() >> 1 ) );// * 20; - renderPos.vx = Pos.vx - offset.vx; - renderPos.vy = Pos.vy - offset.vy; + renderPos.vx = Pos.vx + m_drawOffset.vx - offset.vx; + renderPos.vy = Pos.vy + m_drawOffset.vy - offset.vy; m_actorGfx->Render(renderPos,m_animNo,m_frame,m_reversed); } diff --git a/source/enemy/nsjfish.cpp b/source/enemy/nsjfish.cpp index e67ba1c62..17305b8c0 100644 --- a/source/enemy/nsjfish.cpp +++ b/source/enemy/nsjfish.cpp @@ -29,7 +29,8 @@ void CNpcEnemy::processSmallJellyfishMovementModifier( int _frames, s32 distX, s s32 newX, newY; s32 preShiftX, preShiftY; - u16 jellyfishData[5] = { 96, 192, 256, 192, 128, }; + //u16 jellyfishData[5] = { 96, 192, 256, 192, 128, }; + u16 jellyfishData[6] = { 256, 192, 96, 48, 96, 128, }; u32 dataPoint; @@ -40,13 +41,15 @@ void CNpcEnemy::processSmallJellyfishMovementModifier( int _frames, s32 distX, s m_movementTimer = 0; } - dataPoint = 4 * m_movementTimer; + dataPoint = 5 * m_movementTimer; if ( dataPoint != 0 ) { dataPoint /= GameState::getOneSecondInFrames(); } + m_frame = ( m_movementTimer * m_actorGfx->getFrameCount(m_animNo) ) / GameState::getOneSecondInFrames(); + s32 resistance; s32 absVelocity = abs( m_velocity ); s32 reqVelocity = dist;