diff --git a/AxibugEmuOnline.Client/Assets/Plugins/AxiReplay/NetReplay.cs b/AxibugEmuOnline.Client/Assets/Plugins/AxiReplay/NetReplay.cs index 74a9e28..1670fc6 100644 --- a/AxibugEmuOnline.Client/Assets/Plugins/AxiReplay/NetReplay.cs +++ b/AxibugEmuOnline.Client/Assets/Plugins/AxiReplay/NetReplay.cs @@ -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; //如果已经超过 diff --git a/AxibugEmuOnline.Client/Assets/Script/Manager/AppRoom.cs b/AxibugEmuOnline.Client/Assets/Script/Manager/AppRoom.cs index 6059ca1..2166f64 100644 --- a/AxibugEmuOnline.Client/Assets/Script/Manager/AppRoom.cs +++ b/AxibugEmuOnline.Client/Assets/Script/Manager/AppRoom.cs @@ -407,7 +407,7 @@ namespace AxibugEmuOnline.Client.Manager void RecvHostSyn_RoomFrameAllInputData(byte[] reqData) { Protobuf_Room_Syn_RoomFrameAllInputData msg = ProtoBufHelper.DeSerizlize(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) diff --git a/AxibugEmuOnline.Client/Assets/Script/MonoCom/TickLoop.cs b/AxibugEmuOnline.Client/Assets/Script/MonoCom/TickLoop.cs index 80d5a0c..ebb2f1a 100644 --- a/AxibugEmuOnline.Client/Assets/Script/MonoCom/TickLoop.cs +++ b/AxibugEmuOnline.Client/Assets/Script/MonoCom/TickLoop.cs @@ -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