// called immediately after OnSessionEnded if it was a changelevel
        void gameMemory_OnMapChanged(object sender, MapChangedEventArgs e)
        {
            Debug.WriteLine("gameMemory_OnMapChanged " + e.Map + " " + e.PrevMap);

            if (!(Settings.AutoSplitOnLevelTrans.Value && !e.IsGeneric))
            {
                if (!(Settings.AutoSplitOnGenericMap.Value && e.IsGeneric))
                {
                    return;
                }
            }

            // this is in case they load a save that was made before current map
            // f**k time travel

            if (!_splitOperations.ExistsTransition(e.PrevMap, e.Map))
            {
                _splitOperations.AddSplit(SplitType.AutoSplitter, e.PrevMap, e.Map);
                this.AutoSplit(e.PrevMap);
            }

            // prevent adding map time twice
            if (_timer.CurrentState.CurrentPhase != TimerPhase.Ended && _timer.CurrentState.CurrentPhase != TimerPhase.NotRunning)
            {
                this.AddMapTime(e.PrevMap, TimeSpan.FromSeconds(_totalMapTicks * _intervalPerTick));
            }
            _totalMapTicks = 0;
        }
Beispiel #2
0
        // called immediately after OnSessionEnded if it was a changelevel
        void gameMemory_OnMapChanged(object sender, MapChangedEventArgs e)
        {
            Debug.WriteLine("gameMemory_OnMapChanged " + e.Map + " " + e.PrevMap);

            // this is in case they load a save that was made before current map
            // f**k time travel
            if (!_mapsVisited.Contains(e.PrevMap))
            {
                _mapsVisited.Add(e.PrevMap);
                this.AutoSplit(e.PrevMap);
            }

            // prevent adding map time twice
            if (_timer.CurrentState.CurrentPhase != TimerPhase.Ended && _timer.CurrentState.CurrentPhase != TimerPhase.NotRunning)
            {
                this.AddMapTime(e.PrevMap, TimeSpan.FromSeconds(_totalMapTicks * _intervalPerTick));
            }
            _totalMapTicks = 0;
        }
        // called immediately after OnSessionEnded if it was a changelevel
        void gameMemory_OnMapChanged(object sender, MapChangedEventArgs e)
        {
            Debug.WriteLine("gameMemory_OnMapChanged " + e.Map + " " + e.PrevMap);

            // this is in case they load a save that was made before current map
            // f**k time travel
            if (!_mapsVisited.Contains(e.PrevMap))
            {
                _mapsVisited.Add(e.PrevMap);
                this.AutoSplit(e.PrevMap);
            }

            // prevent adding map time twice
            if (_state.CurrentPhase != TimerPhase.Ended && _state.CurrentPhase != TimerPhase.NotRunning)
                this.AddMapTime(e.PrevMap, TimeSpan.FromSeconds(_totalMapTime));
            _totalMapTime = 0;
        }