# Began work on new pathfinder

Created CTerrain::getSlope(x,y), and added a new order type to support
high-level pathing.

This was SVN commit r3735.
This commit is contained in:
kevmo
2006-04-09 00:36:52 +00:00
parent 604225f971
commit baf357d2ea
8 changed files with 79 additions and 0 deletions
@@ -592,6 +592,26 @@ bool CEntity::processGoto( CEntityOrder* current, size_t UNUSED(timestep_millis)
return( true );
}
bool CEntity::processGotoWaypoint( CEntityOrder* current, size_t UNUSED(timestep_milli) )
{
CVector2D pos( m_position.X, m_position.Z );
CVector2D path_to = current->m_data[0].location;
m_orderQueue.pop_front();
float Distance = ( path_to - pos ).length();
// Let's just check we're going somewhere...
if( Distance < 0.1f )
{
m_isRunning = false;
m_shouldRun = false;
return( false );
}
g_Pathfinder.requestLowLevelPath( me, path_to );
return( true );
}
bool CEntity::processPatrol( CEntityOrder* current, size_t UNUSED(timestep_millis) )
{
// float timestep=timestep_millis/1000.0f;