This commit is contained in:
Charles 2001-05-14 15:08:47 +00:00
parent 7031c64996
commit 35f5514dc5
3 changed files with 19 additions and 7 deletions

View file

@ -271,7 +271,7 @@ s32 CNpcPath::think( DVECTOR currentPos, bool *pathComplete, bool *waypointChang
return( headingToTarget );
}
bool CNpcPath::thinkFlat( DVECTOR currentPos, bool *pathComplete, s32 *distX, s32 *distY, s32 *heading )
bool CNpcPath::thinkFlat( DVECTOR currentPos, bool *pathComplete, s32 *distX, s32 *distY, s32 *heading, u8 waypointDist )
{
bool pointChange = false;
@ -292,7 +292,7 @@ bool CNpcPath::thinkFlat( DVECTOR currentPos, bool *pathComplete, s32 *distX, s3
*distX = currentWaypoint->pos.vx - currentPos.vx;
*distY = currentWaypoint->pos.vy - currentPos.vy;
if ( abs( *distX ) < 10 )
if ( abs( *distX ) < waypointDist )
{
pointChange = true;
*pathComplete = incPath();

View file

@ -45,7 +45,7 @@ public:
void resetPath();
void reversePathDir();
s32 think( DVECTOR currentPos, bool *pathComplete, bool *waypointChange, s32 *distX, s32 *distY );
bool thinkFlat( DVECTOR currentPos, bool *pathComplete, s32 *distX, s32 *distY, s32 *heading );
bool thinkFlat( DVECTOR currentPos, bool *pathComplete, s32 *distX, s32 *distY, s32 *heading, u8 waypointDist = 10 );
bool thinkVertical( DVECTOR currentPos, bool *pathComplete, s32 *distX, s32 *distY, s32 *heading );
bool getDistToNextWaypoint( DVECTOR currentPos, s32 *distX, s32 *distY );
void getPathXExtents( s32 *minExtent, s32 *maxExtent );