Prototype/Source/Prototype/Private/Task_UpdateMap.cpp
/* Send onboard map data to neighbor agents.
*/
Send onboard map data to neighbor agents.
Send onboard map data to neighbor agents .
void AUSARAgent::ShareMap()
{
    TArray<FGridStruct> map;
    for (AUSARAgent* n : neighborAgents) {
        if(alreadyShared.Find(n->agentID) != INDEX_NONE) {
            n->TakeMapData(map);
            alreadyShared.Add(n->agentID);
        }
    }
}
void AUSARAgent :: ShareMap ( ) { TArray < FGridStruct > map ; for ( AUSARAgent * n : neighborAgents ) { if ( alreadyShared . Find ( n -> agentID ) != INDEX_NONE ) { n -> TakeMapData ( map ) ; alreadyShared . Add ( n -> agentID ) ; } } }
Send onboard map data to neighbor agents.
Send onboard map data to neighbor agents .