XPMP2-Remote/Client.cpp
void ClientTryGetAI ()
{
    // make sure we do this from the main thread only!
    assert (rcGlob.IsXPThread());
    
    // no need to try (again)?
    if (bWaitingForAI || XPMPHasControlOfAIAircraft())
        return;
    
    // Try getting AI control, pass callback for the case we couldn't get it
    const char* cszResult = XPMPMultiplayerEnable(ClientCBRetryGetAI);
    if ( cszResult[0] ) {
        bWaitingForAI = true;
        LOG_MSG(logWARN, "%s", cszResult);
    } else if (XPMPHasControlOfAIAircraft()) {
        bWaitingForAI = false;
        LOG_MSG(logINFO, INFO_GOT_AI_CONTROL);
    }
}
// Try getting TCAS/AI control
Try getting TCAS/AI control
Try getting TCAS / AI control
void ClientTryGetAI ()
{
    assert (rcGlob.IsXPThread());
    if (bWaitingForAI || XPMPHasControlOfAIAircraft())
        return;
    const char* cszResult = XPMPMultiplayerEnable(ClientCBRetryGetAI);
    if ( cszResult[0] ) {
        bWaitingForAI = true;
        LOG_MSG(logWARN, "%s", cszResult);
    } else if (XPMPHasControlOfAIAircraft()) {
        bWaitingForAI = false;
        LOG_MSG(logINFO, INFO_GOT_AI_CONTROL);
    }
}
void ClientTryGetAI ( ) { assert ( rcGlob . IsXPThread ( ) ) ; if ( bWaitingForAI || XPMPHasControlOfAIAircraft ( ) ) return ; const char * cszResult = XPMPMultiplayerEnable ( ClientCBRetryGetAI ) ; if ( cszResult [ 0 ] ) { bWaitingForAI = true ; LOG_MSG ( logWARN , " " , cszResult ) ; } else if ( XPMPHasControlOfAIAircraft ( ) ) { bWaitingForAI = false ; LOG_MSG ( logINFO , INFO_GOT_AI_CONTROL ) ; } }
Try getting TCAS/AI control
Try getting TCAS / AI control
// make sure we do this from the main thread only! // no need to try (again)? // Try getting AI control, pass callback for the case we couldn't get it