Example #1
0
        public void Update(IInvalidator invalidator, LiveSplitState state, float width, float height, LayoutMode mode)
        {
            int millis = Pointer.GetIgt(); //Native.GetGameTimeMilliseconds(addr, p.Id.GetHandle(), 8);

            if (millis > 100)
            {
                _oldMillis = millis;
                _latch     = false;
            }

            if (millis == 0 && !_latch)
            {
                _oldMillis -= 594;
                _latch      = true;
            }
            if (_oldMillis <= 0)
            {
                _oldMillis = 0;
            }

            state.SetGameTime(new TimeSpan(0, 0, 0, 0, _oldMillis <= 1 ? 1 : _oldMillis));

            //autostart timer. Might be worth changing this to something based on some memory flag
            if (_control.cb_autoStartTimer.Checked && millis > 0 && millis < 500)
            {
                if (state.CurrentPhase == TimerPhase.NotRunning)
                {
                    TimerModel timer = new TimerModel();
                    timer.CurrentState = state;
                    timer.Start();
                }
            }

            //autosplit
            if (_control.cb_autoSplit.Checked)
            {
                _splitter.AttemptSplit();
            }
        }
Example #2
0
        public void Update(IInvalidator invalidator, LiveSplitState state, float width, float height, LayoutMode mode)
        {
            int millis = Pointer.GetIgt(); //Native.GetGameTimeMilliseconds(addr, p.Id.GetHandle(), 8);

            if (millis > 100)
            {
                _oldMillis = millis;
                _latch     = false;
            }

            if (millis == 0 && !_latch)
            {
                _oldMillis -= 594;
                _latch      = true;
            }
            if (_oldMillis <= 0)
            {
                _oldMillis = 0;
            }

            state.SetGameTime(new TimeSpan(0, 0, 0, 0, _oldMillis <= 1 ? 1 : _oldMillis));
        }