This commit is contained in:
Charles 2001-01-29 20:11:05 +00:00
parent 177b885a35
commit afe18eca33

View File

@ -459,7 +459,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
void CNpc::init()
{
m_type = NPC_FISH_HOOK;
m_type = NPC_FALLING_ITEM;
m_heading = m_fireHeading = 0;
m_movementTimer = 0;
@ -516,7 +516,6 @@ void CNpc::init()
break;
case NPC_INIT_SKULL_STOMPER:
case NPC_INIT_FALLING_ITEM:
{
m_heading = m_fireHeading = 1024;
@ -570,6 +569,24 @@ void CNpc::init()
break;
}
case NPC_INIT_FALLING_ITEM:
{
m_heading = m_fireHeading = 1024;
m_npcPath.initPath();
DVECTOR newPos;
newPos.vx = 100;
newPos.vy = 200;
m_npcPath.addWaypoint( newPos );
m_npcPath.setPathType( SINGLE_USE_PATH );
break;
}
case NPC_INIT_FISH_HOOK:
{
m_heading = m_fireHeading = 3072;
@ -578,11 +595,6 @@ void CNpc::init()
DVECTOR newPos;
newPos.vx = 100;
newPos.vy = 100;
m_npcPath.addWaypoint( newPos );
newPos.vx = 100;
newPos.vy = -100;
@ -866,7 +878,6 @@ bool CNpc::processSensor()
case NPC_SENSOR_ANEMONE_USER_CLOSE:
case NPC_SENSOR_EYEBALL_USER_CLOSE:
case NPC_SENSOR_FALLING_ITEM_USER_CLOSE:
{
if ( xDistSqr + yDistSqr < 40000 )
{
@ -938,6 +949,21 @@ bool CNpc::processSensor()
}
}
case NPC_SENSOR_FALLING_ITEM_USER_CLOSE:
{
if ( xDistSqr + yDistSqr < 40000 )
{
m_controlFunc = NPC_CONTROL_CLOSE;
m_movementTimer = GameState::getOneSecondInFrames() * 3;
return( true );
}
else
{
return( false );
}
}
default:
return( false );
}