This commit is contained in:
parent
4b980a9213
commit
d238e6ac10
@ -75,4 +75,35 @@ void CNpc::processCloseClamAttack( int _frames )
|
||||
m_sensorFunc = NPC_SENSOR_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CNpc::processClamRetract( int _frames )
|
||||
{
|
||||
s32 velocity;
|
||||
|
||||
// retract
|
||||
|
||||
if ( m_extension > 0 )
|
||||
{
|
||||
velocity = -_frames;
|
||||
|
||||
if ( m_extension < _frames )
|
||||
{
|
||||
velocity = m_extension - _frames;
|
||||
}
|
||||
|
||||
m_extension += velocity;
|
||||
|
||||
|
||||
Pos.vx += ( velocity * rcos( m_heading ) ) >> 12;
|
||||
Pos.vy += ( velocity * rsin( m_heading ) ) >> 12;
|
||||
}
|
||||
else
|
||||
{
|
||||
// halt clam
|
||||
|
||||
m_controlFunc = NPC_CONTROL_NONE;
|
||||
m_timerFunc = NPC_TIMER_NONE;
|
||||
m_sensorFunc = NPC_SENSOR_NONE;
|
||||
}
|
||||
}
|
@ -48,7 +48,7 @@
|
||||
|
||||
void CNpc::init()
|
||||
{
|
||||
m_type = NPC_FLAMING_SKULL;
|
||||
m_type = NPC_CLAM;
|
||||
|
||||
m_heading = m_fireHeading = 0;
|
||||
m_movementTimer = 0;
|
||||
|
@ -163,6 +163,7 @@ protected:
|
||||
NPC_MOVEMENT_PENDULUM,
|
||||
NPC_MOVEMENT_FIREBALL,
|
||||
NPC_MOVEMENT_RETURNING_HAZARD,
|
||||
NPC_MOVEMENT_CLAM_RETRACT,
|
||||
};
|
||||
|
||||
enum NPC_MOVEMENT_MODIFIER_FUNC
|
||||
@ -272,6 +273,7 @@ protected:
|
||||
// clam functions
|
||||
|
||||
void processCloseClamAttack( int _frames );
|
||||
void processClamRetract( int _frames );
|
||||
|
||||
// spider crab functions
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user