public bool CheckPath()
{
if ( !Enabled )
return false;
bool repath = false;
Point3D goal = GetGoalLocation();
if ( m_Path == null )
repath = true;
else if ( (!m_Path.Success || goal != m_LastGoalLoc) && (m_LastPathTime + RepathDelay) <= DateTime.Now )
repath = true;
else if ( m_Path.Success && Check( m_From.Location, m_LastGoalLoc, 0 ) )
repath = true;
if ( !repath )
return false;
m_LastPathTime = DateTime.Now;
m_LastGoalLoc = goal;
m_Path = new MovementPath( m_From, goal );
m_Index = 0;
m_Next = m_From.Location;
Advance( ref m_Next, m_Index );
return true;
}