This commit is contained in:
Charles 2001-01-30 20:30:52 +00:00
parent 6957055ab1
commit 9d0aef7b89
3 changed files with 48 additions and 1 deletions

View File

@ -108,6 +108,18 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
2048,
},
{ // NPC_FIREBALL
NPC_INIT_FIREBALL,
NPC_SENSOR_NONE,
NPC_MOVEMENT_FIREBALL,
NPC_MOVEMENT_MODIFIER_NONE,
NPC_CLOSE_NONE,
NPC_TIMER_NONE,
false,
3,
2048,
},
{ // NPC_SMALL_JELLYFISH_1
NPC_INIT_DEFAULT,
NPC_SENSOR_JELLYFISH_USER_CLOSE,
@ -483,7 +495,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
void CNpc::init()
{
m_type = NPC_FISH_HOOK;
m_type = NPC_FIREBALL;
m_heading = m_fireHeading = 0;
m_movementTimer = 0;
@ -638,6 +650,28 @@ void CNpc::init()
break;
}
case NPC_INIT_FIREBALL:
{
m_npcPath.initPath();
DVECTOR newPos;
newPos.vx = 200;
newPos.vy = 100;
m_npcPath.addWaypoint( newPos );
m_npcPath.setPathType( SINGLE_USE_PATH );
m_extension = newPos.vx - Pos.vx;
m_velocity = m_data[m_type].speed;
m_timerTimer = GameState::getOneSecondInFrames() * 4;
break;
}
default:
break;
@ -1146,6 +1180,13 @@ void CNpc::processMovement(int _frames)
break;
}
case NPC_MOVEMENT_FIREBALL:
{
processFireballMovement( _frames );
break;
}
default:
break;

View File

@ -34,6 +34,7 @@ public:
NPC_FISH_HOOK,
NPC_DUST_DEVIL,
NPC_PENDULUM,
NPC_FIREBALL,
NPC_SMALL_JELLYFISH_1,
NPC_SMALL_JELLYFISH_2,
NPC_LARGE_JELLYFISH,
@ -92,6 +93,7 @@ protected:
NPC_INIT_FALLING_ITEM,
NPC_INIT_FISH_HOOK,
NPC_INIT_PENDULUM,
NPC_INIT_FIREBALL,
};
enum NPC_CONTROL_FUNC
@ -155,6 +157,7 @@ protected:
NPC_MOVEMENT_FLYING_DUTCHMAN,
NPC_MOVEMENT_IRON_DOGFISH,
NPC_MOVEMENT_PENDULUM,
NPC_MOVEMENT_FIREBALL,
};
enum NPC_MOVEMENT_MODIFIER_FUNC
@ -304,6 +307,7 @@ protected:
void processCloseFallingItemFall( int _frames );
void processCloseFishHookRise( int _frames );
void processPendulumMovement( int _frames );
void processFireballMovement( int _frames );
// data

View File

@ -84,6 +84,8 @@ void CNpcPath::addWaypoint( DVECTOR newPos )
this->waypoint = newWaypoint;
waypointCount++;
currentWaypoint = this->waypoint;
}
}