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; }
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; }