fixed netreplay

This commit is contained in:
sin365 2024-09-13 13:52:37 +08:00
parent 42b3a7995c
commit 3eb8059389

View File

@ -10,14 +10,23 @@ namespace AxiReplay
ReplayStep mNextReplay;
ReplayStep mCurrReplay;
int byFrameIdx = 0;
/// <summary>
/// 服务器远端当前帧
/// </summary>
public int remoteFrameIdx { get; private set; }
/// <summary>
/// 当前帧和服务器帧相差数量
/// </summary>
public int remoteFrameDiff => remoteFrameIdx - mCurrPlayFrame;
public NetReplay()
{
mQueueReplay = new Queue<ReplayStep>();
}
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)
{