diff --git a/makefile.gaz b/makefile.gaz index ae7b9c2f8..d61b3c3d2 100644 --- a/makefile.gaz +++ b/makefile.gaz @@ -71,6 +71,7 @@ enemy_src := 2denemy \ ndogfish \ nhazard \ nffolk \ + nocto \ enemy projectl_src := projectl diff --git a/source/enemy/npc.cpp b/source/enemy/npc.cpp index 284435229..b49d3cdbf 100644 --- a/source/enemy/npc.cpp +++ b/source/enemy/npc.cpp @@ -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; + } } } diff --git a/source/enemy/npc.h b/source/enemy/npc.h index e75b14906..0d0ade90b 100644 --- a/source/enemy/npc.h +++ b/source/enemy/npc.h @@ -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 ); diff --git a/source/enemy/npcdata.cpp b/source/enemy/npcdata.cpp index 2bb3fb9e0..6fd726d76 100644 --- a/source/enemy/npcdata.cpp +++ b/source/enemy/npcdata.cpp @@ -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 diff --git a/users/paul/spongebob project/spongebob project.dsp b/users/paul/spongebob project/spongebob project.dsp index 5db7a8d78..d2d987d31 100644 --- a/users/paul/spongebob project/spongebob project.dsp +++ b/users/paul/spongebob project/spongebob project.dsp @@ -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