recvInput

This commit is contained in:
sin365 2024-11-11 11:39:38 +08:00
parent 4606a57157
commit 960aad4831
3 changed files with 5 additions and 4 deletions

View File

@ -30,11 +30,13 @@ namespace AxiReplay
mNextReplay = default(ReplayStep);
mCurrReplay = default(ReplayStep);
}
public void InData(ReplayStep inputData,int ServerFrameIdx)
public void InData(ReplayStep inputData, int ServerFrameIdx)
{
mQueueReplay.Enqueue(inputData);
mRemoteFrameIdx = inputData.FrameStartID;
}
public bool NextFrame(out ReplayStep data, out int FrameDiff)
{
return TakeFrame(0, out data, out FrameDiff);
@ -66,7 +68,7 @@ namespace AxiReplay
}
return Changed;
}
void UpdateNextFrame(int targetFrame,out int FrameDiff)
void UpdateNextFrame(int targetFrame, out int FrameDiff)
{
FrameDiff = mRemoteFrameIdx - targetFrame;
//如果已经超过

View File

@ -407,7 +407,7 @@ namespace AxibugEmuOnline.Client.Manager
void RecvHostSyn_RoomFrameAllInputData(byte[] reqData)
{
Protobuf_Room_Syn_RoomFrameAllInputData msg = ProtoBufHelper.DeSerizlize<Protobuf_Room_Syn_RoomFrameAllInputData>(reqData);
//netReplay.InData(new ReplayStep() { FrameStartID = (int)msg.FrameID, InPut = msg.InputData }, (int)msg.ServerFrameID);
netReplay.InData(new ReplayStep() { FrameStartID = (int)msg.FrameID, InPut = msg.InputData }, (int)msg.ServerFrameID);
}
public void SendScreen(byte[] RenderBuffer)

View File

@ -6,7 +6,6 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Sockets;
using UnityEngine;
namespace AxibugEmuOnline.Client