Prototype/Source/Prototype/Private/Task_MoveToWP.cpp
/* Determines if the flock is ready to move to the next waypoint as a group. If no waypoints exist, the control station is set as the waypoint.
*
*	@return True if the flock is ready, false if not.
*/
Determines if the flock is ready to move to the next waypoint as a group. If no waypoints exist, the control station is set as the waypoint.
Determines if the flock is ready to move to the next waypoint as a group . If no waypoints exist the control station is set as the waypoint .
void AUSARAgent::FlockReadyToMove()
{
    bool ready = true;
    for (AUSARAgent* n : neighborAgents) {
        if (!(n->statusLoitering || n->statusTraveling)) {
            return;
        }
    }
    if (!flockWPs.Num()) {
        flockWPs.Add(baseStation);
        numWPs++;
        statusRTB = true;
    }
    statusLoitering = false;
    statusTraveling = true;
    GetWorldTimerManager().ClearTimer(timerCheckMoveReady);
    GetWorldTimerManager().SetTimer(timerMoveTask, this, &AUSARAgent::MoveToWPHandle, RATE_WP_TASK, true);
}
void AUSARAgent :: FlockReadyToMove ( ) { bool ready = true ; for ( AUSARAgent * n : neighborAgents ) { if ( ! ( n -> statusLoitering || n -> statusTraveling ) ) { return ; } } if ( ! flockWPs . Num ( ) ) { flockWPs . Add ( baseStation ) ; numWPs ++ ; statusRTB = true ; } statusLoitering = false ; statusTraveling = true ; GetWorldTimerManager ( ) . ClearTimer ( timerCheckMoveReady ) ; GetWorldTimerManager ( ) . SetTimer ( timerMoveTask , this , & AUSARAgent :: MoveToWPHandle , RATE_WP_TASK , true ) ; }
Determines if the flock is ready to move to the next waypoint as a group.
Determines if the flock is ready to move to the next waypoint as a group .