コード例 #1
0
        //public void SetControlsChange(bool Value)
        //{
        //    m_controlsChange = Value;
        //}

        //public bool GetControlsChange()
        //{
        //    return m_controlsChange;
        //}

        public void AddEnterSectorResponse(MyMwcObjectBuilder_Checkpoint checkpoint, MyMissionID? missionToStart)
        {
            m_checkpoint = checkpoint;
            if (missionToStart != null)
            {
                m_missionToStart = missionToStart;
            }
        }
コード例 #2
0
        public void TravelToSector(MyMwcSectorIdentifier sectorIdentifier, MyMwcTravelTypeEnum travelType, Vector3 currentShipPosition, MyMissionID? missionToStart = null)
        {
            if (MySession.Static != null)
            {
                if (m_type == MyGuiScreenGamePlayType.GAME_STORY && !MyClientServer.LoggedPlayer.GetCanSave()) // Game travel is not allowed when user cannot save
                {
                    return;
                }
                if (!CanTravel && !MyFakes.ENABLE_SOLAR_MAP && !MyFakes.TEST_MULTIPLE_LOAD_UNLOAD)
                {
                    return;
                }

                m_transferToNeighbouringSectorStarted = true;

                m_travelSectorIdentifier = sectorIdentifier;
                m_travelReason = travelType;
                m_missionToStart = missionToStart;

                if (m_type != MyGuiScreenGamePlayType.EDITOR_STORY && m_previousType != MyGuiScreenGamePlayType.EDITOR_STORY && !MyFakes.DISABLE_AUTO_SAVE)
                {
                    MySession.Static.Player.TravelLeave(m_travelReason);

                    if (!MyMinerGame.IsPaused())
                        MyMinerGame.SwitchPause();

                    MyServerAction serverAction = MySession.Static.SaveLastCheckpoint(); // Saving before travel, save sector
                    travelSaveSuccess();
                }
                else
                {
                    travelSaveSuccess();
                }
            }
        }