This commit is contained in:
parent
1351ec7f57
commit
cd7e60ae81
1 changed files with 0 additions and 72 deletions
|
@ -151,78 +151,6 @@ void CNpcRollingRockHazard::processMovement( int _frames )
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*if ( m_npcPath.thinkFlat( Pos, &pathComplete, &distX, &distY, &m_heading ) )
|
||||
{
|
||||
if ( pathComplete )
|
||||
{
|
||||
// reset
|
||||
|
||||
Pos = m_base;
|
||||
m_npcPath.resetPath();
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// check for vertical movement
|
||||
|
||||
groundHeight = m_layerCollision->getHeightFromGround( Pos.vx, Pos.vy, yMovement + 16 );
|
||||
|
||||
if ( groundHeight <= yMovement )
|
||||
{
|
||||
// groundHeight <= yMovement indicates either just above ground or on or below ground
|
||||
|
||||
moveY = groundHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
// fall
|
||||
|
||||
moveY = yMovement;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// check for collision
|
||||
|
||||
distX = distX / abs( distX );
|
||||
|
||||
if ( m_layerCollision->getHeightFromGround( Pos.vx + ( distX * 3 * _frames ), Pos.vy ) < -maxHeight )
|
||||
{
|
||||
// there is an obstacle in the way, increment the path point (hopefully this will resolve the problem)
|
||||
|
||||
m_npcPath.incPath();
|
||||
}
|
||||
else
|
||||
{
|
||||
// check for vertical movement
|
||||
|
||||
groundHeight = m_layerCollision->getHeightFromGround( Pos.vx, Pos.vy, yMovement + 16 );
|
||||
|
||||
moveX = distX * 3 * _frames;
|
||||
|
||||
if ( groundHeight <= yMovement )
|
||||
{
|
||||
// groundHeight <= yMovement indicates either just above ground or on or below ground
|
||||
|
||||
moveY = groundHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
// fall
|
||||
|
||||
moveY = yMovement;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if ( moveX < 0 )
|
||||
{
|
||||
m_rotation -= 64 * _frames;
|
||||
|
|
Loading…
Add table
Reference in a new issue