diff --git a/source/hazard/hbwheel.cpp b/source/hazard/hbwheel.cpp index 1a76b793b..dfa853434 100644 --- a/source/hazard/hbwheel.cpp +++ b/source/hazard/hbwheel.cpp @@ -71,3 +71,18 @@ void CNpcBigWheelHazard::collidedWith( CThing *_thisThing ) { // do not collide } + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +const CRECT *CNpcBigWheelHazard::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/hazard/hbwheel.h b/source/hazard/hbwheel.h index dba5b1ebe..bb6944704 100644 --- a/source/hazard/hbwheel.h +++ b/source/hazard/hbwheel.h @@ -23,6 +23,7 @@ class CNpcBigWheelHazard : public CNpcHazard public: void init(); virtual void render(); + virtual CRECT const *getThinkBBox(); protected: void processMovement( int _frames ); virtual void collidedWith(CThing *_thisThing); diff --git a/source/platform/pbwheel.cpp b/source/platform/pbwheel.cpp index a797c35bc..1cffc7766 100644 --- a/source/platform/pbwheel.cpp +++ b/source/platform/pbwheel.cpp @@ -76,3 +76,18 @@ void CNpcBigWheelPlatform::setWaypoints( sThingPlatform *ThisPlatform ) init( startPos ); } } + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +const CRECT *CNpcBigWheelPlatform::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/pbwheel.h b/source/platform/pbwheel.h index 376d59d60..da84c1707 100644 --- a/source/platform/pbwheel.h +++ b/source/platform/pbwheel.h @@ -20,6 +20,8 @@ class CNpcBigWheelPlatform : public CNpcPlatform { +public: + virtual CRECT const *getThinkBBox(); protected: virtual void setWaypoints( sThingPlatform *ThisPlatform ); virtual void processMovement( int _frames );