diff --git a/makefile.gaz b/makefile.gaz index a99a48463..cc6816ef0 100644 --- a/makefile.gaz +++ b/makefile.gaz @@ -137,7 +137,8 @@ hazard_src := hazard \ hspikes \ hbwheel \ hdbarrel \ - hbbarrel + hbbarrel \ + hrrock fx_src := fx \ fxtrail \ diff --git a/source/hazard/hazard.cpp b/source/hazard/hazard.cpp index b607031b6..e18e1ee6b 100644 --- a/source/hazard/hazard.cpp +++ b/source/hazard/hazard.cpp @@ -87,6 +87,10 @@ #include "hazard\hfirebal.h" #endif +#ifndef __HAZARD_HRROCK_H__ +#include "hazard\hrrock.h" +#endif + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -106,6 +110,7 @@ CNpcHazard::NPC_HAZARD_UNIT_TYPE CNpcHazard::mapEditConvertTable[NPC_HAZARD_TYPE NPC_DUAL_PLATFORM_BARREL_HAZARD, NPC_BOUNCING_BARREL_HAZARD, NPC_FIREBALL_HAZARD, + NPC_ROLLING_ROCK_HAZARD, }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -202,6 +207,12 @@ CNpcHazard *CNpcHazard::Create(sThingHazard *ThisHazard) break; } + case NPC_ROLLING_ROCK_HAZARD: + { + hazard = new ("rolling rock hazard") CNpcRollingRockHazard; + break; + } + default: { hazard = NULL; diff --git a/source/hazard/hazard.h b/source/hazard/hazard.h index 1d65f5116..e6ef87673 100644 --- a/source/hazard/hazard.h +++ b/source/hazard/hazard.h @@ -50,6 +50,7 @@ public: NPC_DUAL_PLATFORM_BARREL_HAZARD, NPC_BOUNCING_BARREL_HAZARD, NPC_FIREBALL_HAZARD, + NPC_ROLLING_ROCK_HAZARD, NPC_HAZARD_TYPE_MAX, }; diff --git a/source/platform/pbubble.cpp b/source/platform/pbubble.cpp index 762c477d5..7e1d1c00e 100644 --- a/source/platform/pbubble.cpp +++ b/source/platform/pbubble.cpp @@ -25,4 +25,19 @@ void CNpcBubblePlatform::processMovement( int _frames ) { setToShutdown(); } +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +const CRECT *CNpcBubblePlatform::getThinkBBox() +{ + CRECT objThinkBox = getCollisionArea(); + + sBBox &thinkBBox = CThingManager::getThinkBBox(); + objThinkBox.x1 = thinkBBox.XMin; + objThinkBox.x2 = thinkBBox.XMax; + objThinkBox.y1 = thinkBBox.YMin; + objThinkBox.y2 = thinkBBox.YMax; + + return &objThinkBox; } \ No newline at end of file diff --git a/source/platform/pbubble.h b/source/platform/pbubble.h index e3fb4b812..1416c7e8d 100644 --- a/source/platform/pbubble.h +++ b/source/platform/pbubble.h @@ -20,6 +20,8 @@ class CNpcBubblePlatform : public CNpcPlatform { +public: + virtual CRECT const *getThinkBBox(); protected: virtual void processMovement( int _frames ); }; diff --git a/tools/Data/bin/MkLevel.ini b/tools/Data/bin/MkLevel.ini index 62b25aa71..ff9d2ac6e 100644 --- a/tools/Data/bin/MkLevel.ini +++ b/tools/Data/bin/MkLevel.ini @@ -134,7 +134,7 @@ HeartPendulum=1 Tugboat=2 Acorn=0 PumpkinPendulum=1 -RollingRock=3 +RollingRock=14 CircularSaw=5 Pylons=4 SpinningBlades=6 diff --git a/users/paul/spongebob project/spongebob project.dsp b/users/paul/spongebob project/spongebob project.dsp index 83ed8eaa7..26496c137 100644 --- a/users/paul/spongebob project/spongebob project.dsp +++ b/users/paul/spongebob project/spongebob project.dsp @@ -909,6 +909,14 @@ SOURCE=..\..\..\source\hazard\hpendulm.h # End Source File # Begin Source File +SOURCE=..\..\..\source\hazard\hrrock.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\hazard\hrrock.h +# End Source File +# Begin Source File + SOURCE=..\..\..\source\hazard\hsaw.cpp # End Source File # Begin Source File