This commit is contained in:
Charles 2001-05-09 21:50:09 +00:00
parent 17ec5b64c3
commit 8bb80c5c4d
6 changed files with 16 additions and 8 deletions

View File

@ -164,7 +164,7 @@ void CNpcStaticClamEnemy::processClose( int _frames )
} }
} }
void CNpcStaticClamEnemy::processShot() void CNpcStaticClamEnemy::processShot( int _frames )
{ {
if ( !m_isStunned ) if ( !m_isStunned )
{ {

View File

@ -36,7 +36,7 @@ public:
virtual int checkCollisionAgainst(CThing *_thisThing, int _frames); virtual int checkCollisionAgainst(CThing *_thisThing, int _frames);
protected: protected:
virtual void collidedWith(CThing *_thisThing); virtual void collidedWith(CThing *_thisThing);
virtual void processShot(); virtual void processShot( int _frames );
virtual void processClose( int _frames ); virtual void processClose( int _frames );
u8 m_isStunned; u8 m_isStunned;

View File

@ -801,7 +801,7 @@ void CNpcEnemy::think(int _frames)
break; break;
case NPC_CONTROL_SHOT: case NPC_CONTROL_SHOT:
processShot(); processShot( moveFrames );
break; break;
@ -1145,7 +1145,7 @@ void CNpcEnemy::hasBeenAttacked()
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcEnemy::processShot() void CNpcEnemy::processShot( int _frames )
{ {
switch( m_data[m_type].shotFunc ) switch( m_data[m_type].shotFunc )
{ {
@ -1205,12 +1205,21 @@ void CNpcEnemy::processShot()
m_frame = 0; m_frame = 0;
m_state = NPC_GENERIC_HIT_DEATH_END; m_state = NPC_GENERIC_HIT_DEATH_END;
if (m_data[m_type].skelType)
{
m_actorGfx->SetOtPos( 0 );
}
break; break;
} }
case NPC_GENERIC_HIT_DEATH_END: case NPC_GENERIC_HIT_DEATH_END:
{ {
if ( !m_animPlaying ) Pos.vy += 5 * _frames;
DVECTOR offset = CLevel::getCameraPos();
if ( Pos.vy - offset.vy > VidGetScrH() )
{ {
if ( m_data[m_type].respawning ) if ( m_data[m_type].respawning )
{ {

View File

@ -235,7 +235,7 @@ protected:
virtual bool processSensor(); virtual bool processSensor();
virtual void processMovement( int _frames ); virtual void processMovement( int _frames );
virtual void processMovementModifier( int _frames, s32 distX, s32 distY, s32 dist, s16 headingChange ); virtual void processMovementModifier( int _frames, s32 distX, s32 distY, s32 dist, s16 headingChange );
virtual void processShot(); virtual void processShot( int _frames );
virtual void processClose( int _frames ); virtual void processClose( int _frames );
virtual void processCollision(); virtual void processCollision();
virtual void processAttackCollision(); virtual void processAttackCollision();

View File

@ -108,7 +108,7 @@ void CNpcSmallJellyfishProjectileEnemy::think(int _frames)
break; break;
case NPC_CONTROL_SHOT: case NPC_CONTROL_SHOT:
processShot(); processShot( moveFrames );
break; break;

View File

@ -161,7 +161,6 @@ protected:
bool processSensor(); bool processSensor();
virtual void processMovement( int _frames ); virtual void processMovement( int _frames );
virtual void processLifetime( int _frames ); virtual void processLifetime( int _frames );
void processShot();
void processClose( int _frames ); void processClose( int _frames );
void processCollision(); void processCollision();
virtual void processTimer( int _frames ); virtual void processTimer( int _frames );