This commit is contained in:
Charles 2001-04-03 18:32:24 +00:00
parent 8c791a4ab5
commit 4807987d37
7 changed files with 145 additions and 3 deletions

View file

@ -224,6 +224,9 @@ s32 CNpcPath::think( DVECTOR currentPos, bool *pathComplete, bool *waypointChang
{
*pathComplete = incPath();
*waypointChange = true;
xDist = currentWaypoint->pos.vx - currentPos.vx;
yDist = currentWaypoint->pos.vy - currentPos.vy;
}
s32 headingToTarget = ratan2( yDist, xDist );
@ -256,6 +259,9 @@ bool CNpcPath::thinkFlat( DVECTOR currentPos, s32 *distX, s32 *distY, s32 *headi
incPath();
}
*distX = currentWaypoint->pos.vx - currentPos.vx;
*distY = currentWaypoint->pos.vy - currentPos.vy;
if ( *distX > 0 )
{
*heading = 0;