From 5f3c7770a41590275e7552c6098329b69d1e4d72 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 22 May 2001 20:10:02 +0000 Subject: [PATCH] --- source/hazard/hdbarrel.cpp | 15 +++++++++++++++ source/hazard/hdbarrel.h | 1 + source/platform/pdual.cpp | 15 +++++++++++++++ source/platform/pdual.h | 1 + 4 files changed, 32 insertions(+) diff --git a/source/hazard/hdbarrel.cpp b/source/hazard/hdbarrel.cpp index 43e323cca..1d3c86ffc 100644 --- a/source/hazard/hdbarrel.cpp +++ b/source/hazard/hdbarrel.cpp @@ -174,4 +174,19 @@ void CNpcDualPlatformBarrelHazard::render() m_modelGfx->Render(renderPos,&rotation,&scale); } +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +const CRECT *CNpcDualPlatformBarrelHazard::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/hdbarrel.h b/source/hazard/hdbarrel.h index 80d1ecfe4..d4a8e9268 100644 --- a/source/hazard/hdbarrel.h +++ b/source/hazard/hdbarrel.h @@ -23,6 +23,7 @@ class CNpcDualPlatformBarrelHazard : public CNpcHazard public: void init(); void render(); + virtual CRECT const *getThinkBBox(); protected: void processMovement( int _frames ); diff --git a/source/platform/pdual.cpp b/source/platform/pdual.cpp index 76418539d..51b3a3791 100644 --- a/source/platform/pdual.cpp +++ b/source/platform/pdual.cpp @@ -217,3 +217,18 @@ void CNpcDualPlatform::render() } } } + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +const CRECT *CNpcDualPlatform::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/pdual.h b/source/platform/pdual.h index 132292f74..fe3002061 100644 --- a/source/platform/pdual.h +++ b/source/platform/pdual.h @@ -28,6 +28,7 @@ public: void setLineBase( DVECTOR base ) {m_lineBase = base;} DVECTOR getLineBase() {return( m_lineBase );} virtual void render(); + virtual CRECT const *getThinkBBox(); protected: virtual void setWaypoints( sThingPlatform *ThisPlatform ); virtual void processMovement( int _frames );