diff --git a/source/platform/pjellfsh.cpp b/source/platform/pjellfsh.cpp index 5470be422..3e2c240a8 100644 --- a/source/platform/pjellfsh.cpp +++ b/source/platform/pjellfsh.cpp @@ -193,4 +193,19 @@ void CNpcJellyfishPlatform::render() } } +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +const CRECT *CNpcJellyfishPlatform::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/pjellfsh.h b/source/platform/pjellfsh.h index f0569a1f3..6797b81f3 100644 --- a/source/platform/pjellfsh.h +++ b/source/platform/pjellfsh.h @@ -24,6 +24,7 @@ public: virtual void render(); virtual void postInit(); virtual void think( int _frames ); + virtual CRECT const *getThinkBBox(); protected: virtual void collidedWith(CThing *_thisThing); diff --git a/source/platform/plinear.cpp b/source/platform/plinear.cpp index 97a2aff16..07b63444b 100644 --- a/source/platform/plinear.cpp +++ b/source/platform/plinear.cpp @@ -136,3 +136,18 @@ void CNpcLinearPlatform::processMovement( int _frames ) Pos.vx += moveX; Pos.vy += moveY; } + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +const CRECT *CNpcLinearPlatform::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/plinear.h b/source/platform/plinear.h index 300c9778f..381f71b9d 100644 --- a/source/platform/plinear.h +++ b/source/platform/plinear.h @@ -22,6 +22,7 @@ class CNpcLinearPlatform : public CNpcPlatform { public: virtual void postInit(); + virtual CRECT const *getThinkBBox(); protected: virtual void processMovement( int _frames ); };