This commit is contained in:
Charles 2001-04-25 20:09:36 +00:00
parent 51249170a7
commit a3e585e960
4 changed files with 13 additions and 13 deletions

View file

@ -35,13 +35,6 @@ void CNpcFishHookPlatform::processLifetime( int _frames )
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcFishHookPlatform::setToShutdown()
{
m_isShuttingDown = true;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcFishHookPlatform::processMovement( int _frames ) void CNpcFishHookPlatform::processMovement( int _frames )
{ {
if ( m_isMoving ) if ( m_isMoving )
@ -50,7 +43,7 @@ void CNpcFishHookPlatform::processMovement( int _frames )
if ( Pos.vy < 0 ) if ( Pos.vy < 0 )
{ {
shutdown(); setToShutdown();
} }
} }
} }

View file

@ -22,14 +22,11 @@ class CNpcFishHookPlatform : public CNpcPlatform
{ {
public: public:
virtual void postInit(); virtual void postInit();
void setToShutdown();
u8 isSetToShutdown() {return( m_isShuttingDown );}
protected: protected:
virtual void processLifetime( int _frames ); virtual void processLifetime( int _frames );
virtual void processMovement( int _frames ); virtual void processMovement( int _frames );
u8 m_isMoving; u8 m_isMoving;
u8 m_isShuttingDown;
}; };
#endif #endif

View file

@ -337,6 +337,13 @@ void CNpcPlatform::shutdown()
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcPlatform::setToShutdown()
{
m_isShuttingDown = true;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcPlatform::processLifetime( int _frames ) void CNpcPlatform::processLifetime( int _frames )
{ {
switch( m_lifetimeType ) switch( m_lifetimeType )
@ -347,8 +354,7 @@ void CNpcPlatform::processLifetime( int _frames )
if ( m_lifetime <= 0 ) if ( m_lifetime <= 0 )
{ {
shutdown(); setToShutdown();
delete this;
return; return;
} }

View file

@ -78,6 +78,9 @@ public:
static NPC_PLATFORM_UNIT_TYPE getTypeFromMapEdit( u16 newType ); static NPC_PLATFORM_UNIT_TYPE getTypeFromMapEdit( u16 newType );
static CNpcPlatform *Create(sThingPlatform *ThisPlatform); static CNpcPlatform *Create(sThingPlatform *ThisPlatform);
void setToShutdown();
u8 isSetToShutdown() {return( m_isShuttingDown );}
protected: protected:
// NPC data structure definitions // // NPC data structure definitions //
@ -176,6 +179,7 @@ protected:
int m_frame; int m_frame;
int m_animNo; int m_animNo;
CModelGfx *m_modelGfx; CModelGfx *m_modelGfx;
u8 m_isShuttingDown;
virtual void collidedWith(CThing *_thisThing); virtual void collidedWith(CThing *_thisThing);