Esempio n. 1
0
        public void AttachAutopilot(MyAutopilotBase newAutopilot, bool updateSync = true)
        {
            RemoveAutopilot();
            m_aiPilot = newAutopilot;
            m_aiPilot.AttachedToShipController(this);

            if (updateSync && Sync.IsServer)
            {
                MyMultiplayer.RaiseEvent(this, x => x.AttachAutopilot_message, newAutopilot.GetObjectBuilder());
            }

            NeedsUpdate |= MyEntityUpdateEnum.EACH_10TH_FRAME;
        }
Esempio n. 2
0
        public void AttachAutopilot(MyAutopilotBase newAutopilot, bool updateSync = true)
        {
            RemoveAutopilot();
            m_aiPilot = newAutopilot;
            m_aiPilot.AttachedToShipController(this);

            if (updateSync && Sync.IsServer)
            {
                SyncObject.SendAutopilotAttached(newAutopilot.GetObjectBuilder());
            }

            NeedsUpdate |= MyEntityUpdateEnum.EACH_10TH_FRAME;
        }