This commit is contained in:
Charles 2001-06-05 14:05:10 +00:00
parent 64360d491d
commit 629e2b7c28
2 changed files with 29 additions and 5 deletions

View File

@ -335,7 +335,7 @@ CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
},
{ // NPC_STEERABLE_BARREL_PLATFORM
2,
3,
128,
true,
DAMAGE__NONE,

View File

@ -56,13 +56,37 @@ void CNpcSteerableBarrelPlatform::processMovement( int _frames )
{
DVECTOR playerPos = player->getPos();
s32 playerX = playerPos.vx - this->Pos.vx;
DVECTOR *playerVel = player->getMoveVelocity();
s32 speedChange = -playerVel->vx << 8;
if ( speedChange > ( _frames << 5 ) )
{
speedChange = _frames << 5;
}
else if ( speedChange < -( _frames << 5 ) )
{
speedChange = -_frames << 5;
}
m_currentSpeed += speedChange;
if ( m_currentSpeed > ( m_speed << 8 ) )
{
m_currentSpeed = ( m_speed << 8 );
}
else if ( m_currentSpeed < -( m_speed << 8 ) )
{
m_currentSpeed = -( m_speed << 8 );
}
/*s32 playerX = playerPos.vx - this->Pos.vx;
if ( playerX > 5 )
{
// increase barrel speed to right
m_currentSpeed += _frames;
m_currentSpeed += _frames << 2;
if ( m_currentSpeed > ( m_speed << 8 ) )
{
@ -71,13 +95,13 @@ void CNpcSteerableBarrelPlatform::processMovement( int _frames )
}
else if ( playerX < -5 )
{
m_currentSpeed -= _frames;
m_currentSpeed -= _frames << 2;
if ( m_currentSpeed < -( m_speed << 8 ) )
{
m_currentSpeed = -( m_speed << 8 );
}
}
}*/
}
else
{