This commit is contained in:
Charles 2001-05-10 19:27:57 +00:00
parent 3ea8916a41
commit 0112cd13e2
10 changed files with 112 additions and 25 deletions

View file

@ -61,6 +61,7 @@ public:
void setLayerCollision( class CLayerCollision *_layer ) {m_layerCollision=_layer;}
virtual void setWaypoints( sThingHazard *ThisHazard );
void addWaypoint( s32 xPos, s32 yPos );
virtual void setRespawnRate( s16 newRespawnRate ) {m_respawnRate=newRespawnRate;}
static NPC_HAZARD_UNIT_TYPE getTypeFromMapEdit( u16 newType );
static CNpcHazard *Create(sThingHazard *ThisHazard);
@ -96,6 +97,7 @@ protected:
bool m_extendDir;
s32 m_heading;
CModelGfx *m_modelGfx;
s16 m_respawnRate;
CThing *m_platform;

View file

@ -166,3 +166,26 @@ void CNpcBoatHazard::render()
}
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcBoatHazard::collidedWith( CThing *_thisThing )
{
if ( m_isActive )
{
switch(_thisThing->getThingType())
{
case TYPE_PLAYER:
{
CPlayer *player = (CPlayer *) _thisThing;
break;
}
default:
ASSERT(0);
break;
}
}
}

View file

@ -25,6 +25,7 @@ public:
virtual void render();
protected:
void processMovement( int _frames );
virtual void collidedWith(CThing *_thisThing);
u8 m_reversed;
};

View file

@ -29,7 +29,9 @@ void CNpcFallingHazard::init()
{
CNpcHazard::init();
m_movementTimer = 3 * GameState::getOneSecondInFrames();
m_movementTimer = 2 * GameState::getOneSecondInFrames();
m_respawnRate = 4;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -67,7 +69,7 @@ void CNpcFallingHazard::processMovement( int _frames )
m_isActive = false;
m_timerActive = true;
m_timer = 3 * GameState::getOneSecondInFrames();
m_timer = ( m_respawnRate - 1 ) * GameState::getOneSecondInFrames();
}
else
{
@ -89,6 +91,6 @@ void CNpcFallingHazard::processTimer( int _frames )
m_timerActive = false;
m_isActive = true;
Pos = m_base;
m_movementTimer = 3 * GameState::getOneSecondInFrames();
m_movementTimer = 2 * GameState::getOneSecondInFrames();
}
}

View file

@ -40,7 +40,8 @@ void CNpcFireballHazard::init()
m_extension = 0;
m_velocity = 40;
m_timer = GameState::getOneSecondInFrames() * 3;
m_respawnRate = 4;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -75,7 +76,7 @@ void CNpcFireballHazard::processMovement( int _frames )
m_extension = 0;
m_isActive = false;
m_timerActive = true;
m_timer = 3 * GameState::getOneSecondInFrames();
m_timer = ( m_respawnRate - 1 ) * GameState::getOneSecondInFrames();
return;
}