This commit is contained in:
Charles 2001-04-20 20:22:16 +00:00
parent 952fb82287
commit f613848385
27 changed files with 552 additions and 730 deletions

View file

@ -73,12 +73,42 @@ void CNpcEnemy::processGenericGotoTarget( int _frames, s32 xDist, s32 yDist, s32
moveX = preShiftX / abs( preShiftX );
}
if ( xDist > 0 )
{
if ( moveX > xDist )
{
moveX = xDist;
}
}
else
{
if ( moveX < xDist )
{
moveX = xDist;
}
}
moveY = preShiftY >> 12;
if ( !moveY && preShiftY )
{
moveY = preShiftY / abs( preShiftY );
}
if ( yDist > 0 )
{
if ( moveY > yDist )
{
moveY = yDist;
}
}
else
{
if ( moveY < yDist )
{
moveY = yDist;
}
}
Pos.vx += moveX;
Pos.vy += moveY;
}