예제 #1
0
        void gameMemory_OnPlayerLostControl(object sender, PlayerControlChangedEventArgs e)
        {
            if (!this.Settings.AutoStartEndResetEnabled)
            {
                return;
            }

            _sessionTicksOffset += e.TicksOffset;
            this.DoSplit();
        }
예제 #2
0
        void gameMemory_OnPlayerGainedControl(object sender, PlayerControlChangedEventArgs e)
        {
            if (!this.Settings.AutoStartEndResetEnabled)
            {
                return;
            }

            _timer.Reset(); // make sure to reset for games that start from a quicksave (Aperture Tag)
            _timer.Start();
            _sessionTicksOffset += e.TicksOffset;
        }
        void gameMemory_ManualSplit(object sender, PlayerControlChangedEventArgs e)
        {
            if (!this.Settings.AutoSplitEnabled.Value || !this.Settings.AutoSplitOnSpecial.Value)
            {
                return;
            }

            _tickOffset = e.TicksOffset;

            Debug.WriteLine("** time adjusted, " + _tickOffset + " ticks were added to time");
            this.DoSplitandRevertOffset();
        }
        void gameMemory_OnPlayerGainedControl(object sender, PlayerControlChangedEventArgs e)
        {
            if (Settings.ResetMapTransitions.Value)
            {
                _splitOperations.Clear();
                _splitCount = 0;
            }

            if (!this.Settings.AutoStartEnabled.Value)
            {
                return;
            }

            if (_timer.CurrentState.CurrentPhase == TimerPhase.Running)
            {
                if (Settings.SplitInstead.Value)
                {
                    gameMemory_ManualSplit(sender, e);
                    return;
                }
                else if (!Settings.AutoResetEnabled.Value)
                {
                    return;
                }
            }

            _timer.Reset(); // make sure to reset for games that start from a quicksave (Aperture Tag)
            _timer.Start();

            if (Settings.RTAStartOffset.Value)
            {
                _timer.CurrentState.AdjustedStartTime -= TimeSpan.FromSeconds(Math.Abs(e.TicksOffset) * _intervalPerTick);
            }

            _sessionTicksOffset += e.TicksOffset;
            _tickOffset          = e.TicksOffset;
        }
예제 #5
0
        void gameMemory_OnPlayerLostControl(object sender, PlayerControlChangedEventArgs e)
        {
            if (!this.Settings.AutoStartEndResetEnabled)
                return;

            _sessionTimeOffset += e.TimeOffset;
            this.DoSplit();
        }
예제 #6
0
        void gameMemory_OnPlayerGainedControl(object sender, PlayerControlChangedEventArgs e)
        {
            if (!this.Settings.AutoStartEndResetEnabled)
                return;

            _timer.Reset(); // make sure to reset for games that start from a quicksave (Aperture Tag)
            _timer.Start();
            _sessionTimeOffset += e.TimeOffset;
        }