From 338830ca96242980efb177557dc2f1804a079c72 Mon Sep 17 00:00:00 2001
From: sin365 <353374337@qq.com>
Date: Fri, 13 Sep 2024 13:52:37 +0800
Subject: [PATCH] fixed netreplay
---
.../Assets/Plugins/AxiReplay/NetReplay.cs | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/AxiReplay/NetReplay.cs b/AxibugEmuOnline.Client/Assets/Plugins/AxiReplay/NetReplay.cs
index ec674320..e5c98b0b 100644
--- a/AxibugEmuOnline.Client/Assets/Plugins/AxiReplay/NetReplay.cs
+++ b/AxibugEmuOnline.Client/Assets/Plugins/AxiReplay/NetReplay.cs
@@ -10,14 +10,23 @@ namespace AxiReplay
ReplayStep mNextReplay;
ReplayStep mCurrReplay;
int byFrameIdx = 0;
+ ///
+ /// 服务器远端当前帧
+ ///
+ public int remoteFrameIdx { get; private set; }
+ ///
+ /// 当前帧和服务器帧相差数量
+ ///
+ public int remoteFrameDiff => remoteFrameIdx - mCurrPlayFrame;
public NetReplay()
{
mQueueReplay = new Queue();
}
- public void InData(ReplayStep inputData)
+ public void InData(ReplayStep inputData,int ServerFrameIdx)
{
mQueueReplay.Enqueue(inputData);
MaxInFrame = inputData.FrameStartID;
+ remoteFrameIdx = ServerFrameIdx;
}
public bool NextFrame(out ReplayStep data, out int FrameDiff)
{