This commit is contained in:
parent
60762b9727
commit
f456cabe0f
4 changed files with 19 additions and 5 deletions
|
@ -590,7 +590,6 @@ void CNpcEnemy::init()
|
|||
{
|
||||
m_actorGfx=CActorPool::GetActor((FileEquate)m_data[m_type].skelType);
|
||||
m_spriteBank=0;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -640,8 +639,6 @@ void CNpcEnemy::init()
|
|||
m_isBlowerOn = false;
|
||||
m_speed = m_data[m_type].speed;
|
||||
|
||||
setCollisionSize( 100, 100 );
|
||||
|
||||
updateCollisionArea();
|
||||
}
|
||||
|
||||
|
@ -746,6 +743,13 @@ void CNpcEnemy::processGraphicFlipping()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
s32 CNpcEnemy::getFrameShift( int _frames )
|
||||
{
|
||||
return( ( _frames << 8 ) >> 1 );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcEnemy::think(int _frames)
|
||||
{
|
||||
int moveFrames = _frames;
|
||||
|
@ -777,7 +781,7 @@ void CNpcEnemy::think(int _frames)
|
|||
|
||||
frameCount = getFrameCount();
|
||||
|
||||
s32 frameShift = ( moveFrames << 8 ) >> 1;
|
||||
s32 frameShift = getFrameShift( moveFrames );
|
||||
|
||||
if ( ( frameCount << 8 ) - m_frame > frameShift )
|
||||
{
|
||||
|
|
|
@ -254,6 +254,7 @@ protected:
|
|||
bool processGroundCollisionReverse( s32 *moveX, s32 *moveY );
|
||||
virtual void processEnemyCollision( CThing *thisThing );
|
||||
virtual void processUserCollision( CThing *thisThing );
|
||||
virtual s32 getFrameShift( int _frames );
|
||||
|
||||
void reinit();
|
||||
|
||||
|
|
|
@ -91,4 +91,11 @@ void CNpcSquidDartEnemy::fireAsProjectile( s16 heading )
|
|||
projectile->setGraphic( FRM_SQUIDDART_SWIM0001 );
|
||||
projectile->setHasRGB( true );
|
||||
projectile->setRGB( 255, 128, 255 );
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
s32 CNpcSquidDartEnemy::getFrameShift( int _frames )
|
||||
{
|
||||
return( ( _frames << 8 ) >> 2 );
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ public:
|
|||
virtual int getFrameCount() {return( FRM_SQUIDDART_SWIM0004 - FRM_SQUIDDART_SWIM0001 + 1 );}
|
||||
virtual u8 canCollideWithEnemy() {return( false );}
|
||||
virtual void fireAsProjectile( s16 heading );
|
||||
protected:
|
||||
virtual s32 getFrameShift( int _frames );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue