This commit is contained in:
parent
8c791a4ab5
commit
4807987d37
7 changed files with 145 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue