This commit is contained in:
parent
bfa96dcf14
commit
33b3ec96e2
@ -121,7 +121,7 @@ void CNpcLanternPlatform::processMovement( int _frames )
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
/*const CRECT *CNpcLanternPlatform::getThinkBBox()
|
const CRECT *CNpcLanternPlatform::getThinkBBox()
|
||||||
{
|
{
|
||||||
CRECT objThinkBox = getCollisionArea();
|
CRECT objThinkBox = getCollisionArea();
|
||||||
|
|
||||||
@ -132,4 +132,4 @@ void CNpcLanternPlatform::processMovement( int _frames )
|
|||||||
objThinkBox.y2 = thinkBBox.YMax;
|
objThinkBox.y2 = thinkBBox.YMax;
|
||||||
|
|
||||||
return &objThinkBox;
|
return &objThinkBox;
|
||||||
}*/
|
}
|
||||||
|
@ -22,7 +22,7 @@ class CNpcLanternPlatform : public CNpcPlatform
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void postInit();
|
virtual void postInit();
|
||||||
//virtual CRECT const *getThinkBBox();
|
virtual CRECT const *getThinkBBox();
|
||||||
protected:
|
protected:
|
||||||
virtual void setWaypoints( sThingPlatform *ThisPlatform );
|
virtual void setWaypoints( sThingPlatform *ThisPlatform );
|
||||||
virtual void processMovement( int _frames );
|
virtual void processMovement( int _frames );
|
||||||
|
@ -108,6 +108,7 @@ void CNpcRaftPlatform::processMovement( int _frames )
|
|||||||
{
|
{
|
||||||
// fall
|
// fall
|
||||||
|
|
||||||
|
moveX = distX * m_speed * _frames;
|
||||||
moveY = yMovement;
|
moveY = yMovement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -150,18 +151,18 @@ void CNpcRaftPlatform::processMovement( int _frames )
|
|||||||
|
|
||||||
s16 heightDiff;
|
s16 heightDiff;
|
||||||
|
|
||||||
heightDiff = CGameScene::getCollision()->getHeightFromGround( testPos1.vx, testPos1.vy, 16 );
|
heightDiff = CGameScene::getCollision()->getHeightFromGround( testPos1.vx, testPos1.vy, 32 );
|
||||||
|
|
||||||
if ( heightDiff == 16 )
|
if ( heightDiff == 32 )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
testPos1.vy += heightDiff;
|
testPos1.vy += heightDiff;
|
||||||
|
|
||||||
heightDiff = CGameScene::getCollision()->getHeightFromGround( testPos2.vx, testPos2.vy, 16 );
|
heightDiff = CGameScene::getCollision()->getHeightFromGround( testPos2.vx, testPos2.vy, 32 );
|
||||||
|
|
||||||
if ( heightDiff == 16 )
|
if ( heightDiff == 32 )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user