void AssertRouteValid( AI_Waypoint_t* route ) { // Check that the goal wasn't just clobbered if (route) { AI_Waypoint_t* waypoint = route; while (waypoint) { #ifdef _GOALDEBUG if (!waypoint->GetNext() && !(waypoint->Flags() & (bits_WP_TO_GOAL|bits_WP_TO_PATHCORNER))) { DevMsg( "!!ERROR!! Final waypoint is not a goal!\n"); } #endif waypoint->AssertValid(); waypoint = waypoint->GetNext(); } } }