diff --git a/source/platform/pfallnor.cpp b/source/platform/pfallnor.cpp index 888f68ee8..ed3c00f5c 100644 --- a/source/platform/pfallnor.cpp +++ b/source/platform/pfallnor.cpp @@ -70,4 +70,19 @@ void CNpcFallingNoRespawnPlatform::processMovement( int _frames ) Pos.vx += moveX; Pos.vy += moveY; } +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +const CRECT *CNpcFallingNoRespawnPlatform::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/pfallnor.h b/source/platform/pfallnor.h index 298e4dc73..8b0c380ea 100644 --- a/source/platform/pfallnor.h +++ b/source/platform/pfallnor.h @@ -22,6 +22,7 @@ class CNpcFallingNoRespawnPlatform : public CNpcPlatform { public: virtual void postInit(); + virtual CRECT const *getThinkBBox(); protected: virtual void processMovement( int _frames ); }; diff --git a/source/platform/pfgen.cpp b/source/platform/pfgen.cpp index cbaaecd1c..92ed8f99d 100644 --- a/source/platform/pfgen.cpp +++ b/source/platform/pfgen.cpp @@ -103,3 +103,18 @@ void CNpcFallingPlatformGenerator::think( int _frames ) newPlatform->postInit(); } } + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +const CRECT *CNpcFallingPlatformGenerator::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/pfgen.h b/source/platform/pfgen.h index 39313e1d7..5a102a73c 100644 --- a/source/platform/pfgen.h +++ b/source/platform/pfgen.h @@ -23,6 +23,7 @@ class CNpcFallingPlatformGenerator : public CNpcPlatform public: void setTargetType( NPC_PLATFORM_UNIT_TYPE targetType ) {m_targetType = targetType;} virtual void render(); + virtual CRECT const *getThinkBBox(); protected: virtual void think( int _frames ); virtual void collidedWith(CThing *_thisThing);