This commit is contained in:
parent
bf44855659
commit
c4816ee7b8
@ -85,9 +85,9 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||
},
|
||||
|
||||
{ // NPC_DUST_DEVIL
|
||||
NPC_INIT_DEFAULT,
|
||||
NPC_INIT_DUST_DEVIL,
|
||||
NPC_SENSOR_NONE,
|
||||
NPC_MOVEMENT_FIXED_PATH,
|
||||
NPC_MOVEMENT_DUST_DEVIL,
|
||||
NPC_MOVEMENT_MODIFIER_NONE,
|
||||
NPC_CLOSE_NONE,
|
||||
NPC_TIMER_NONE,
|
||||
@ -495,7 +495,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||
|
||||
void CNpc::init()
|
||||
{
|
||||
m_type = NPC_FIREBALL;
|
||||
m_type = NPC_DUST_DEVIL;
|
||||
|
||||
m_heading = m_fireHeading = 0;
|
||||
m_movementTimer = 0;
|
||||
@ -669,6 +669,27 @@ void CNpc::init()
|
||||
break;
|
||||
}
|
||||
|
||||
case NPC_INIT_DUST_DEVIL:
|
||||
{
|
||||
m_npcPath.initPath();
|
||||
|
||||
DVECTOR newPos;
|
||||
|
||||
newPos.vx = 100;
|
||||
newPos.vy = 10;
|
||||
|
||||
m_npcPath.addWaypoint( newPos );
|
||||
|
||||
newPos.vx = 500;
|
||||
newPos.vy = 10;
|
||||
|
||||
m_npcPath.addWaypoint( newPos );
|
||||
|
||||
m_npcPath.setPathType( SINGLE_USE_PATH );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
|
||||
break;
|
||||
@ -1184,6 +1205,13 @@ void CNpc::processMovement(int _frames)
|
||||
break;
|
||||
}
|
||||
|
||||
case NPC_MOVEMENT_DUST_DEVIL:
|
||||
{
|
||||
processDustDevilMovement( _frames );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
|
||||
break;
|
||||
|
@ -94,6 +94,7 @@ protected:
|
||||
NPC_INIT_FISH_HOOK,
|
||||
NPC_INIT_PENDULUM,
|
||||
NPC_INIT_FIREBALL,
|
||||
NPC_INIT_DUST_DEVIL,
|
||||
};
|
||||
|
||||
enum NPC_CONTROL_FUNC
|
||||
@ -158,6 +159,7 @@ protected:
|
||||
NPC_MOVEMENT_IRON_DOGFISH,
|
||||
NPC_MOVEMENT_PENDULUM,
|
||||
NPC_MOVEMENT_FIREBALL,
|
||||
NPC_MOVEMENT_DUST_DEVIL,
|
||||
};
|
||||
|
||||
enum NPC_MOVEMENT_MODIFIER_FUNC
|
||||
@ -308,6 +310,7 @@ protected:
|
||||
void processCloseFishHookRise( int _frames );
|
||||
void processPendulumMovement( int _frames );
|
||||
void processFireballMovement( int _frames );
|
||||
void processDustDevilMovement( int _frames );
|
||||
|
||||
// data
|
||||
|
||||
|
@ -46,7 +46,7 @@ void CNpcPath::initPath()
|
||||
|
||||
void CNpcPath::resetPath()
|
||||
{
|
||||
currentWaypoint = NULL;
|
||||
currentWaypoint = waypoint;
|
||||
}
|
||||
|
||||
void CNpcPath::addWaypoint( DVECTOR newPos )
|
||||
|
Loading…
Reference in New Issue
Block a user