diff --git a/source/enemy/ngen.cpp b/source/enemy/ngen.cpp index 4da9333da..453bf71f9 100644 --- a/source/enemy/ngen.cpp +++ b/source/enemy/ngen.cpp @@ -48,10 +48,7 @@ void CNpcEnemyGenerator::think(int _frames) m_movementTimer = 3 * GameState::getOneSecondInFrames(); CNpcEnemy *enemy; - enemy = new( "spider crab" ) CNpcSpiderCrabEnemy; - ASSERT(enemy); - enemy->setType( CNpcEnemy::NPC_SPIDER_CRAB ); - enemy->init(); + enemy=CNpcEnemy::Create( CNpcEnemy::NPC_SPIDER_CRAB ); enemy->setStartPos( Pos.vx >> 4, Pos.vy >> 4 ); u16 *waypointPtr = m_npcPath.getWaypointPtr(); @@ -64,8 +61,8 @@ void CNpcEnemyGenerator::think(int _frames) enemy->setWaypointPtr( waypointPtr ); enemy->setPathType( m_npcPath.getPathType() ); - enemy->postInit(); + enemy->updateCollisionArea(); addChild( enemy ); } diff --git a/source/enemy/nworm.cpp b/source/enemy/nworm.cpp index ff658b7c0..79a749fb9 100644 --- a/source/enemy/nworm.cpp +++ b/source/enemy/nworm.cpp @@ -704,9 +704,6 @@ void CNpcParasiticWormEnemy::processShot( int _frames ) case NPC_GENERIC_HIT_DEATH_START: { - m_animPlaying = true; - m_animNo = m_data[m_type].dieAnim; - m_frame = 0; m_state = NPC_GENERIC_HIT_DEATH_END; if ( m_data[m_type].deathSfx < CSoundMediator::NUM_SFXIDS ) @@ -727,9 +724,6 @@ void CNpcParasiticWormEnemy::processShot( int _frames ) case NPC_GENERIC_HIT_DEATH_END: { - m_drawRotation += 64 * _frames; - m_drawRotation &= 4095; - Pos.vy += m_speed * _frames; // go through segments diff --git a/source/jellfish/jellfish.cpp b/source/jellfish/jellfish.cpp index f1efe38f7..6f4214bb0 100644 --- a/source/jellfish/jellfish.cpp +++ b/source/jellfish/jellfish.cpp @@ -122,8 +122,6 @@ void CJellyfishGenerator::think( int _frames, CLevel *level ) } } - //enemy->init(); - DVECTOR offset = CLevel::getCameraPos(); DVECTOR startPos;