This commit is contained in:
parent
01584391c4
commit
d20f856ff4
@ -70,4 +70,19 @@ void CNpcFallingNoRespawnPlatform::processMovement( int _frames )
|
||||
Pos.vx += moveX;
|
||||
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;
|
||||
}
|
@ -22,6 +22,7 @@ class CNpcFallingNoRespawnPlatform : public CNpcPlatform
|
||||
{
|
||||
public:
|
||||
virtual void postInit();
|
||||
virtual CRECT const *getThinkBBox();
|
||||
protected:
|
||||
virtual void processMovement( int _frames );
|
||||
};
|
||||
|
@ -103,3 +103,18 @@ void CNpcFallingPlatformGenerator::think( int _frames )
|
||||
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;
|
||||
}
|
@ -23,6 +23,7 @@ class CNpcFallingPlatformGenerator : public CNpcPlatform
|
||||
public:
|
||||
void setTargetType( NPC_PLATFORM_UNIT_TYPE targetType ) {m_targetType = targetType;}
|
||||
virtual void render();
|
||||
virtual CRECT const *getThinkBBox();
|
||||
protected:
|
||||
virtual void think( int _frames );
|
||||
virtual void collidedWith(CThing *_thisThing);
|
||||
|
Loading…
Reference in New Issue
Block a user