Ejemplo n.º 1
0
 public void Despawn(uint aircraftId)
 {
     lock (lockObj)
     {
         logger.LogDebug("Despawning object ID {id}.", aircraftId);
         simconnect?.AIRemoveObject(aircraftId, DATA_REQUESTS.AI_DESPAWN);
     }
 }
Ejemplo n.º 2
0
 private void RemoveFarAwayObjects(Coordinate userLocation, int radius)
 {
     foreach (var simObject in ObjectsInSimulation.Values)
     {
         if (Distance(userLocation, simObject.Location) > radius)
         {
             sc.AIRemoveObject(simObject.ObjectID, Requests.RemoveAI);
         }
     }
 }
Ejemplo n.º 3
0
        private void detach_towplane()
        {
            simconnect.AIRemoveObject(towplaneid, DATA_REQUESTS.REQUEST_PLANE_LIST);

            AirplaneData apd = new AirplaneData();

            apd.altitude  = 99999;
            apd.latitude  = 0;
            apd.longitude = 0;

            simconnect.SetDataOnSimObject(DEFINITIONS.AirplaneData, towplaneid, 0, apd);
            attachTick.Stop();
            button3.Text = "Attach towplane to player";
            isAttached   = false;

            towplaneid = uint.MaxValue;
            playerid   = uint.MaxValue;
        }
Ejemplo n.º 4
0
 public void AiRemoveObject(UInt32 simObject, int enumOffset)
 {
     _mySimconnect.AIRemoveObject(simObject, RequestId.ObjectBase + enumOffset);
 }