This commit is contained in:
parent
8afe90e6d4
commit
52c69c25b8
11 changed files with 64 additions and 31 deletions
|
@ -267,10 +267,12 @@ s32 CNpcPath::think( DVECTOR currentPos, bool *pathComplete, bool *waypointChang
|
|||
return( headingToTarget );
|
||||
}
|
||||
|
||||
bool CNpcPath::thinkFlat( DVECTOR currentPos, s32 *distX, s32 *distY, s32 *heading )
|
||||
bool CNpcPath::thinkFlat( DVECTOR currentPos, bool *pathComplete, s32 *distX, s32 *distY, s32 *heading )
|
||||
{
|
||||
bool pointChange = false;
|
||||
|
||||
*pathComplete = false;
|
||||
|
||||
if ( !this->waypoint )
|
||||
{
|
||||
return( true );
|
||||
|
@ -289,7 +291,7 @@ bool CNpcPath::thinkFlat( DVECTOR currentPos, s32 *distX, s32 *distY, s32 *headi
|
|||
if ( abs( *distX ) < 10 )
|
||||
{
|
||||
pointChange = true;
|
||||
incPath();
|
||||
*pathComplete = incPath();
|
||||
}
|
||||
|
||||
*distX = currentWaypoint->pos.vx - currentPos.vx;
|
||||
|
@ -311,6 +313,8 @@ bool CNpcPath::thinkVertical( DVECTOR currentPos, bool *pathComplete, s32 *distX
|
|||
{
|
||||
bool pointChange = false;
|
||||
|
||||
*pathComplete = false;
|
||||
|
||||
if ( !this->waypoint )
|
||||
{
|
||||
return( true );
|
||||
|
@ -326,8 +330,6 @@ bool CNpcPath::thinkVertical( DVECTOR currentPos, bool *pathComplete, s32 *distX
|
|||
*distX = currentWaypoint->pos.vx - currentPos.vx;
|
||||
*distY = currentWaypoint->pos.vy - currentPos.vy;
|
||||
|
||||
*pathComplete = false;
|
||||
|
||||
if ( abs( *distY ) < 10 )
|
||||
{
|
||||
pointChange = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue