diff --git a/AxibugEmuOnline.Client/Assets/Plugins/AxiReplay/NetReplay.cs b/AxibugEmuOnline.Client/Assets/Plugins/AxiReplay/NetReplay.cs index fba2489..f9dc374 100644 --- a/AxibugEmuOnline.Client/Assets/Plugins/AxiReplay/NetReplay.cs +++ b/AxibugEmuOnline.Client/Assets/Plugins/AxiReplay/NetReplay.cs @@ -8,11 +8,10 @@ namespace AxiReplay /// 客户端当前帧 /// public int mCurrClientFrameIdx => mCurrReplay.FrameStartID; - //public int mCurrClientFrameIdx /// /// 服务器远端当前帧 /// - public int mRemoteFrameIdx { get; private set; } = -1; + public int mRemoteFrameIdx { get; private set; } = int.MinValue; /// /// 网络数据队列 /// @@ -36,7 +35,7 @@ namespace AxiReplay mCurrReplay = default(ReplayStep); mCurrReplay.FrameStartID = 0; mNextReplay = default(ReplayStep); - mNextReplay.FrameStartID = -1; + mNextReplay.FrameStartID = 0; } public void InData(ReplayStep inputData, int ServerFrameIdx) { @@ -52,10 +51,9 @@ namespace AxiReplay { inputDiff = false; int targetFrame = mCurrClientFrameIdx + addFrame; - if (targetFrame >= mNextReplay.FrameStartID && targetFrame <= mRemoteFrameIdx && mNetReplayQueue.Count > 0) + if (targetFrame <= mNextReplay.FrameStartID && targetFrame <= mRemoteFrameIdx && mNetReplayQueue.Count > 0) { //当前帧追加 - //mCurrClientFrameIdx = targetFrame; ulong oldInput = mCurrReplay.InPut; mCurrReplay = mNextReplay; if (oldInput != mCurrReplay.InPut)