From 3932e5a025eb81c79d2731f40ca055874ab60e78 Mon Sep 17 00:00:00 2001 From: feos Date: Sun, 11 Mar 2018 13:49:18 +0300 Subject: [PATCH] tsm decay: fix failing to delete frames if marker is there markers can be *not* mod _step --- BizHawk.Client.Common/movie/tasproj/StateManagerDecay.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.Common/movie/tasproj/StateManagerDecay.cs b/BizHawk.Client.Common/movie/tasproj/StateManagerDecay.cs index da1ec21b27..10695e8a94 100644 --- a/BizHawk.Client.Common/movie/tasproj/StateManagerDecay.cs +++ b/BizHawk.Client.Common/movie/tasproj/StateManagerDecay.cs @@ -66,12 +66,16 @@ namespace BizHawk.Client.Common for (int currentStateIndex = 1; currentStateIndex < baseStateIndex; currentStateIndex++) { - int currentFrame = _tsm.GetStateFrameByIndex(currentStateIndex) / _step; + int currentFrame = _tsm.GetStateFrameByIndex(currentStateIndex); - if (_tsm.StateIsMarker(currentFrame * _step)) + if (_tsm.StateIsMarker(currentFrame)) { continue; } + else + { + currentFrame /= _step; + } int zeroCount = _zeros[currentFrame & _mask]; int priority = ((baseStateFrame - currentFrame) >> zeroCount);