This commit is contained in:
Charles 2001-06-19 21:43:18 +00:00
parent cea1bda63f
commit 279dfe77ea
5 changed files with 23 additions and 32 deletions

View File

@ -1,3 +1,4 @@
bodystatic body1static
headstatic body2static
headstaticmouthshut body3static
headsnap

View File

@ -428,7 +428,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
{ // NPC_SEA_SNAKE { // NPC_SEA_SNAKE
ACTORS_SEASNAKE_SBK, ACTORS_SEASNAKE_SBK,
ANIM_SEASNAKE_HEADSTATICMOUTHSHUT, ANIM_SEASNAKE_HEADSNAP,
NPC_SENSOR_USER_CLOSE, NPC_SENSOR_USER_CLOSE,
NPC_MOVEMENT_FIXED_PATH, NPC_MOVEMENT_FIXED_PATH,
NPC_CLOSE_NONE, NPC_CLOSE_NONE,

View File

@ -230,31 +230,13 @@ void CNpcSeaSnakeEnemy::processMovement( int _frames )
{ {
m_snapTimer -= _frames; m_snapTimer -= _frames;
if ( m_snapTimer <= 0 ) if ( m_snapTimer > 0 )
{ {
m_animNo = ANIM_SEASNAKE_HEADSTATICMOUTHSHUT; if ( !m_animPlaying )
m_animPlaying = true;
m_frame = 0;
}
else
{
m_openTimer -= _frames;
if ( m_openTimer <= 0 )
{ {
if ( m_animNo == ANIM_SEASNAKE_HEADSTATIC ) m_animNo = ANIM_SEASNAKE_HEADSNAP;
{
m_animNo = ANIM_SEASNAKE_HEADSTATICMOUTHSHUT;
}
else
{
m_animNo = ANIM_SEASNAKE_HEADSTATIC;
}
m_animPlaying = true; m_animPlaying = true;
m_frame = 0; m_frame = 0;
m_openTimer = GameState::getOneSecondInFrames() >> 2;
} }
} }
} }
@ -494,7 +476,7 @@ void CNpcSeaSnakeEnemy::processClose( int _frames )
m_sensorFunc = NPC_SENSOR_NONE; m_sensorFunc = NPC_SENSOR_NONE;
m_snapTimer = m_movementTimer; m_snapTimer = m_movementTimer;
m_openTimer = GameState::getOneSecondInFrames() >> 2; //m_openTimer = GameState::getOneSecondInFrames() >> 2;
} }
@ -609,7 +591,7 @@ void CNpcSeaSnakeSegment::render()
if ( renderFlag ) if ( renderFlag )
{ {
SprFrame = m_actorGfx->Render(renderPos,ANIM_SEASNAKE_BODYSTATIC,0,0); SprFrame = m_actorGfx->Render(renderPos,ANIM_SEASNAKE_BODY1STATIC,0,0);
m_actorGfx->RotateScale( SprFrame, renderPos, m_heading, 4096, m_scale ); m_actorGfx->RotateScale( SprFrame, renderPos, m_heading, 4096, m_scale );
sBBox boundingBox = m_actorGfx->GetBBox(); sBBox boundingBox = m_actorGfx->GetBBox();
@ -738,4 +720,11 @@ void CNpcSeaSnakeEnemy::processShot( int _frames )
void CNpcSeaSnakeEnemy::processUserCollision( CThing *thisThing ) void CNpcSeaSnakeEnemy::processUserCollision( CThing *thisThing )
{ {
} }
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
s32 CNpcSeaSnakeEnemy::getFrameShift( int _frames )
{
return( ( _frames << 8 ) >> 3 );
}

View File

@ -55,6 +55,7 @@ public:
virtual int checkCollisionAgainst(CThing *_thisThing, int _frames); virtual int checkCollisionAgainst(CThing *_thisThing, int _frames);
//virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
virtual s32 getFrameShift( int _frames );
virtual bool processSensor(); virtual bool processSensor();
virtual void processClose( int _frames ); virtual void processClose( int _frames );
virtual void processMovement( int _frames ); virtual void processMovement( int _frames );
@ -85,7 +86,7 @@ protected:
CNpcPositionHistory m_positionHistoryArray[NPC_SEA_SNAKE_SPACING * NPC_SEA_SNAKE_LENGTH]; CNpcPositionHistory m_positionHistoryArray[NPC_SEA_SNAKE_SPACING * NPC_SEA_SNAKE_LENGTH];
s32 m_collTimer; s32 m_collTimer;
s32 m_snapTimer; s32 m_snapTimer;
s32 m_openTimer; //s32 m_openTimer;
bool m_meterOn; bool m_meterOn;
}; };

View File

@ -244,8 +244,8 @@ Health=0
AttackStrength=20 AttackStrength=20
[GiantWorm] [GiantWorm]
#Gfx=..\..\graphics\characters\giantworm\render\psx\GiantWorm_headstatic0000.bmp Gfx=..\..\graphics\characters\giantworm\render\psx\GiantWorm_headstatic0000.bmp
Gfx=..\..\graphics\characters\seasnake\render\psx\seasnake_headstatic0000.bmp #Gfx=..\..\graphics\characters\seasnake\render\psx\seasnake_headstatic0000.bmp
WayPoints=16 WayPoints=16
Speed=3 Speed=3
TurnRate=128 TurnRate=128
@ -282,7 +282,7 @@ Health=64
AttackStrength=20 AttackStrength=20
[SeaSnake] [SeaSnake]
Gfx=..\..\graphics\characters\seasnake\render\psx\seasnake_headstatic0000.bmp Gfx=..\..\graphics\characters\seasnake\render\psx\seasnake_headsnap0000.bmp
WayPoints=16 WayPoints=16
Speed=3 Speed=3
TurnRate=256 TurnRate=256