This commit is contained in:
Charles 2001-02-06 16:14:16 +00:00
parent b5cf87e172
commit 9deca9ba54
5 changed files with 25 additions and 3 deletions

View File

@ -71,6 +71,7 @@ enemy_src := 2denemy \
ndogfish \
nhazard \
nffolk \
nocto \
enemy
projectl_src := projectl

View File

@ -48,7 +48,7 @@
void CNpc::init()
{
m_type = NPC_ZOMBIE_FISH_FOLK;
m_type = NPC_SMALL_JELLYFISH_1;
m_heading = m_fireHeading = 0;
m_movementTimer = 0;
@ -661,6 +661,11 @@ void CNpc::processMovement(int _frames)
s16 headingToTarget = m_npcPath.think( Pos, &pathComplete, &waypointChange );
if ( waypointChange )
{
m_movementTimer = 0;
}
if ( !pathComplete )
{
s16 decDir, incDir;
@ -810,6 +815,13 @@ void CNpc::processMovementModifier(int _frames, s32 distX, s32 distY, s32 dist,
break;
}
case NPC_MOVEMENT_MODIFIER_OCTOPUS:
{
processBabyOctopusMovementModifier( _frames, dist, headingChange );
break;
}
}
}

View File

@ -168,6 +168,7 @@ protected:
NPC_MOVEMENT_MODIFIER_BOB = 1,
NPC_MOVEMENT_MODIFIER_JELLYFISH,
NPC_MOVEMENT_MODIFIER_FISH_FOLK,
NPC_MOVEMENT_MODIFIER_OCTOPUS,
};
enum NPC_TIMER_FUNC
@ -251,6 +252,10 @@ protected:
void processSmallJellyfishMovementModifier( int _frames, s32 distX, s32 distY, s32 dist, s16 headingChange );
void processCloseSmallJellyfishEvade( int _frames );
// baby octopus functions
void processBabyOctopusMovementModifier( int _frames, s32 dist, s16 headingChange );
// fish folk functions
void processFishFolkMovementModifier( int _frames, s32 distX, s32 distY );

View File

@ -321,12 +321,12 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
NPC_INIT_DEFAULT,
NPC_SENSOR_NONE,
NPC_MOVEMENT_FIXED_PATH,
NPC_MOVEMENT_MODIFIER_NONE,
NPC_MOVEMENT_MODIFIER_OCTOPUS,
NPC_CLOSE_NONE,
NPC_TIMER_NONE,
false,
2,
128,
512,
},
{ // NPC_ZOMBIE_FISH_FOLK

View File

@ -169,6 +169,10 @@ SOURCE=..\..\..\source\enemy\nmjfish.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\enemy\nocto.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\enemy\npc.cpp
# End Source File
# Begin Source File