Esempio n. 1
0
        protected override void OnDisabled()
        {
            base.OnDisabled();
            CurrentVesselUpdate.Clear();

            TimingManager.FixedUpdateRemove(TimingManager.TimingStage.ObscenelyEarly, HandleVesselUpdates);
            TimingManager.FixedUpdateRemove(TimingManager.TimingStage.ObscenelyEarly, SendVesselPositionUpdates);
        }
        protected override void OnDisabled()
        {
            base.OnDisabled();
            TimingManager.FixedUpdateRemove(TimingManager.TimingStage.Precalc, SetGameTime);
            TimingManager.FixedUpdateRemove(TimingManager.TimingStage.Precalc, SyncTimeScale);

            SpectateEvent.onStartSpectating.Remove(TimerSyncerEvents.OnStartSpectating);
            ServerStartTime = 0;
        }
Esempio n. 3
0
        protected override void OnDisabled()
        {
            base.OnDisabled();

            TimingManager.FixedUpdateRemove(HandlePositionsStage, HandleVesselUpdates);
            TimingManager.LateUpdateRemove(SendPositionsStage, SendVesselPositionUpdates);

            CurrentVesselUpdate.Clear();
            TargetVesselUpdateQueue.Clear();
        }
        /// <summary>
        /// Unhook from events we previously hooked up to.
        /// </summary>
        private void UnHookEvents()
        {
            ConnectivityManager.RemoveAutopilotHook(parentVessel, UpdateAutopilot);

            if (Vessel.vesselType != VesselType.Unknown && Vessel.vesselType != VesselType.SpaceObject)
            {
                TimingManager.FixedUpdateRemove(TimingManager.TimingStage.ObscenelyEarly, cacheControllable);
                TimingManager.FixedUpdateRemove(TimingManager.TimingStage.BetterLateThanNever, resetControllable);
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Unhook from events we previously hooked up to.
        /// </summary>
        private void UnHookEvents()
        {
            ConnectivityManager.RemoveAutopilotHook(Vessel, UpdateAutopilot);

            if (workAroundEventsEnabled)
            {
                TimingManager.FixedUpdateRemove(TimingManager.TimingStage.ObscenelyEarly, CacheControllable);
                TimingManager.FixedUpdateRemove(TimingManager.TimingStage.BetterLateThanNever, resetControllable);
                workAroundEventsEnabled = false;
            }
        }
Esempio n. 6
0
        protected override void OnDisabled()
        {
            if (!SettingsSystem.CurrentSettings.UseAlternativePositionSystem)
            {
                return;
            }

            base.OnDisabled();
            CurrentVesselUpdate.Clear();

            TimingManager.FixedUpdateRemove(TimingManager.TimingStage.ObscenelyEarly, DisableVesselPrecalculate);
        }
        protected override void OnDisabled()
        {
            base.OnDisabled();

            CurrentVesselUpdate.Clear();
            TargetVesselUpdateQueue.Clear();

            TimingManager.FixedUpdateRemove(TimingManager.TimingStage.ObscenelyEarly, HandleVesselUpdates);
            TimingManager.LateUpdateRemove(TimingManager.TimingStage.BetterLateThanNever, SendVesselPositionUpdates);

            LockEvent.onLockAcquire.Remove(PositionEvents.OnLockAcquire);
        }
Esempio n. 8
0
        protected override void OnDisabled()
        {
            base.OnDisabled();
            TimingManager.FixedUpdateRemove(TimingManager.TimingStage.BetterLateThanNever, CheckVesselsToRefresh);

            GameEvents.onVesselCreate.Remove(VesselProtoEvents.VesselCreate);
            GameEvents.onVesselGoOnRails.Remove(VesselProtoEvents.VesselGoOnRails);
            GameEvents.onFlightReady.Remove(VesselProtoEvents.FlightReady);
            GameEvents.onPartDie.Remove(VesselProtoEvents.OnPartDie);

            //This is the main system that handles the vesselstore so if it's disabled clear the store aswell
            VesselsProtoStore.ClearSystem();
            BannedPartsStr = string.Empty;
        }
Esempio n. 9
0
        protected override void OnDisabled()
        {
            base.OnDisabled();
            TimingManager.FixedUpdateRemove(TimingManager.TimingStage.BetterLateThanNever, CheckVesselsToRefresh);

            GameEvents.onVesselCreate.Remove(VesselProtoEvents.VesselCreate);
            GameEvents.onFlightReady.Remove(VesselProtoEvents.FlightReady);
            GameEvents.onPartDie.Remove(VesselProtoEvents.OnPartDie);
            GameEvents.onGameSceneLoadRequested.Remove(VesselProtoEvents.OnSceneRequested);
            GameEvents.onVesselPartCountChanged.Remove(VesselProtoEvents.VesselPartCountChangedinSpectatingVessel);
            GameEvents.onVesselPartCountChanged.Remove(VesselProtoEvents.VesselPartCountChanged);

            //This is the main system that handles the vesselstore so if it's disabled clear the store aswell
            VesselsProtoStore.ClearSystem();
        }
Esempio n. 10
0
 protected override void OnDestroy()
 {
     TimingManager.UpdateRemove(TimingManager.TimingStage.FlightIntegrator, TimedUpdate);
     TimingManager.FixedUpdateRemove(TimingManager.TimingStage.FlightIntegrator, TimedFixedUpdate);
     base.OnDestroy();
 }
Esempio n. 11
0
 void OnDestroy()
 {
     orbiters.Remove(this);
     TimingManager.FixedUpdateRemove(TimingManager.TimingStage.Earlyish, DoForces);
 }
Esempio n. 12
0
 public void OnDestroy()
 {
     TimingManager.FixedUpdateRemove(TimingManager.TimingStage.Early, EarlyFixedUpdate);
     TimingManager.FixedUpdateRemove(TimingManager.TimingStage.Late, LateFixedUpdate);
 }
 public void OnDestroy()
 {
     TimingManager.LateUpdateRemove(TimingManager.TimingStage.Early, EarlyLateUpdate);
     TimingManager.FixedUpdateRemove(TimingManager.TimingStage.Late, LatePostCalculateTracking);
 }
 public void OnDestroy()
 {
     TimingManager.FixedUpdateRemove(TimingManager.TimingStage.Late,
                                     FixedUpdateLateLate);
 }
Esempio n. 15
0
 public override void OnDestroy()
 {
     TimingManager.UpdateRemove(TimingManager.TimingStage.Precalc, TimedUpdate);
     TimingManager.FixedUpdateRemove(TimingManager.TimingStage.Precalc, TimedFixedUpdate);
     base.OnDestroy();
 }