Esempio n. 1
0
        private void CheckWarp()
        {
            bool resetWarp = true;

            if ((warpMode == WarpMode.MCW_FORCE) || (warpMode == WarpMode.MCW_VOTE) || (warpMode == WarpMode.MCW_LOWEST))
            {
                resetWarp &= warpMaster == "";
            }
            resetWarp &= warpMode != WarpMode.SUBSPACE;
            resetWarp &= (warpMode != WarpMode.SUBSPACE_SIMPLE || !canSubspaceSimpleWarp);
            if ((TimeWarp.CurrentRateIndex > 0) && resetWarp)
            {
                //DarkLog.Debug("Resetting warp rate back to 0");
                TimeWarp.SetRate(0, true);
            }
            if ((TimeWarp.CurrentRateIndex > 0) && (TimeWarp.CurrentRate > 1.1f) && !resetWarp && timeSyncer.locked)
            {
                DarkLog.Debug("Unlocking from subspace");
                timeSyncer.UnlockSubspace();
            }
            if ((TimeWarp.CurrentRateIndex == 0) && (TimeWarp.CurrentRate < 1.1f) && !timeSyncer.locked && ((warpMode == WarpMode.SUBSPACE) || (warpMode == WarpMode.SUBSPACE_SIMPLE)) && (timeSyncer.currentSubspace == -1))
            {
                SendNewSubspace();
            }
        }
Esempio n. 2
0
        private void CheckWarp()
        {
            bool resetWarp = true;

            if ((warpMode == WarpMode.MCW_FORCE) || (warpMode == WarpMode.MCW_VOTE) || (warpMode == WarpMode.MCW_LOWEST))
            {
                if (warpMaster != "")
                {
                    //It could be us or another player. If it's another player it will be controlled from Update() instead.
                    resetWarp = false;
                }
            }
            if (warpMode == WarpMode.SUBSPACE)
            {
                //Never reset warp in SUBSPACE mode.
                resetWarp = false;
            }
            if (warpMode == WarpMode.SUBSPACE_SIMPLE && canSubspaceSimpleWarp)
            {
                resetWarp = false;
            }
            if ((TimeWarp.CurrentRateIndex > 0) && resetWarp)
            {
                //DarkLog.Debug("Resetting warp rate back to 0");
                TimeWarp.SetRate(0, true);
            }
            if ((TimeWarp.CurrentRateIndex > 0) && (TimeWarp.CurrentRate > 1.1f) && !resetWarp && timeSyncer.locked)
            {
                DarkLog.Debug("Unlocking from subspace");
                timeSyncer.UnlockSubspace();
            }
            if ((TimeWarp.CurrentRateIndex == 0) && (TimeWarp.CurrentRate < 1.1f) && !timeSyncer.locked && ((warpMode == WarpMode.SUBSPACE) || (warpMode == WarpMode.SUBSPACE_SIMPLE)) && (timeSyncer.currentSubspace == -1))
            {
                SendNewSubspace();
            }
        }