fixed netreplay
This commit is contained in:
parent
a33f3f2a10
commit
338830ca96
@ -10,14 +10,23 @@ namespace AxiReplay
|
|||||||
ReplayStep mNextReplay;
|
ReplayStep mNextReplay;
|
||||||
ReplayStep mCurrReplay;
|
ReplayStep mCurrReplay;
|
||||||
int byFrameIdx = 0;
|
int byFrameIdx = 0;
|
||||||
|
/// <summary>
|
||||||
|
/// 服务器远端当前帧
|
||||||
|
/// </summary>
|
||||||
|
public int remoteFrameIdx { get; private set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 当前帧和服务器帧相差数量
|
||||||
|
/// </summary>
|
||||||
|
public int remoteFrameDiff => remoteFrameIdx - mCurrPlayFrame;
|
||||||
public NetReplay()
|
public NetReplay()
|
||||||
{
|
{
|
||||||
mQueueReplay = new Queue<ReplayStep>();
|
mQueueReplay = new Queue<ReplayStep>();
|
||||||
}
|
}
|
||||||
public void InData(ReplayStep inputData)
|
public void InData(ReplayStep inputData,int ServerFrameIdx)
|
||||||
{
|
{
|
||||||
mQueueReplay.Enqueue(inputData);
|
mQueueReplay.Enqueue(inputData);
|
||||||
MaxInFrame = inputData.FrameStartID;
|
MaxInFrame = inputData.FrameStartID;
|
||||||
|
remoteFrameIdx = ServerFrameIdx;
|
||||||
}
|
}
|
||||||
public bool NextFrame(out ReplayStep data, out int FrameDiff)
|
public bool NextFrame(out ReplayStep data, out int FrameDiff)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user