From ddc45dbb016f78e7ed92fbeb095269db52d0dbce Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 4 Jun 2001 20:58:12 +0000 Subject: [PATCH] --- source/friend/fgary.cpp | 15 +++++++++++++++ source/friend/fgary.h | 1 + 2 files changed, 16 insertions(+) diff --git a/source/friend/fgary.cpp b/source/friend/fgary.cpp index fc750aa55..6b1cd762a 100644 --- a/source/friend/fgary.cpp +++ b/source/friend/fgary.cpp @@ -189,3 +189,18 @@ void CNpcGaryFriend::startRight() m_extension = EXTEND_RIGHT; m_reversed = false; } + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +const CRECT *CNpcGaryFriend::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; +} diff --git a/source/friend/fgary.h b/source/friend/fgary.h index 4fabe3b98..930b037f4 100644 --- a/source/friend/fgary.h +++ b/source/friend/fgary.h @@ -24,6 +24,7 @@ public: virtual void postInit(); virtual void think( int _frames ); virtual void setupWaypoints( sThingActor *ThisActor ); + virtual CRECT const *getThinkBBox(); DVECTOR const &getTriggerPos() {return( m_triggerPos );} void start() {m_started = true;} void stop() {m_started = false;}