• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA Added AI aircraft removed directly after adding it - why?

KWB

Messages
69
Country
germany
When I add an AI aircraft, I do sometimes see the same aircraft removed right after. So if I add an aircraft (let`s say with id 10) it is reported as removed instantly.

Reading about the reality bubble I understand there might be situations when I cannot add an AI aircraft. However, from my tests it looks all very random. So being located at position x, sometimes I can add aircraft on an airport about 50NM away, sometimes I can`t. When I add such an aircraft and it fails (actually adding does not fail, but is is removed afterwards - no errors while adding), then try again - it works.

Any idea why this happens or what`s the logic behind it?

Code:
            case SIMCONNECT_RECV_ID_EVENT_OBJECT_ADDREMOVE:
                {
                    const SIMCONNECT_RECV_EVENT_OBJECT_ADDREMOVE *event = static_cast<SIMCONNECT_RECV_EVENT_OBJECT_ADDREMOVE *>(pData);
                    const DWORD objectID = event->dwData;
                    const SIMCONNECT_SIMOBJECT_TYPE objectType = event->eObjType;
                    if (objectType != SIMCONNECT_SIMOBJECT_TYPE_AIRCRAFT && objectType != SIMCONNECT_SIMOBJECT_TYPE_HELICOPTER)
                    {
                        break;
                    }

                    // such an object is not necessarily one of ours
                    // for instance, I always see object 5 when I start the simulator
                    if (!simulatorFsx->getSimConnectObjects().isKnownSimObjectId(objectID)) break;
                    switch (event->uEventID)
                    {
                    case SystemEventObjectAdded:
                        // added in SIMCONNECT_RECV_ID_ASSIGNED_OBJECT_ID
                        break;
                    case SystemEventObjectRemoved:
                        simulatorFsx->simulatorReportedObjectRemoved(objectID);
                        break;
                    default:
                        break;
                    }
                    break;
                }
 
Top