This commit is contained in:
Charles 2001-05-22 21:42:39 +00:00
parent 01584391c4
commit d20f856ff4
4 changed files with 32 additions and 0 deletions

View File

@ -70,4 +70,19 @@ void CNpcFallingNoRespawnPlatform::processMovement( int _frames )
Pos.vx += moveX; Pos.vx += moveX;
Pos.vy += moveY; 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;
} }

View File

@ -22,6 +22,7 @@ class CNpcFallingNoRespawnPlatform : public CNpcPlatform
{ {
public: public:
virtual void postInit(); virtual void postInit();
virtual CRECT const *getThinkBBox();
protected: protected:
virtual void processMovement( int _frames ); virtual void processMovement( int _frames );
}; };

View File

@ -103,3 +103,18 @@ void CNpcFallingPlatformGenerator::think( int _frames )
newPlatform->postInit(); 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;
}

View File

@ -23,6 +23,7 @@ class CNpcFallingPlatformGenerator : public CNpcPlatform
public: public:
void setTargetType( NPC_PLATFORM_UNIT_TYPE targetType ) {m_targetType = targetType;} void setTargetType( NPC_PLATFORM_UNIT_TYPE targetType ) {m_targetType = targetType;}
virtual void render(); virtual void render();
virtual CRECT const *getThinkBBox();
protected: protected:
virtual void think( int _frames ); virtual void think( int _frames );
virtual void collidedWith(CThing *_thisThing); virtual void collidedWith(CThing *_thisThing);