远端差异帧

This commit is contained in:
sin365 2024-09-13 13:46:04 +08:00
parent 841fff9be2
commit 42b3a7995c
3 changed files with 81 additions and 42 deletions

View File

@ -99,8 +99,8 @@ namespace AxibugEmuOnline.Client.ClientCore
}
yield return null;
Connect("127.0.0.1", 10492);
//Connect(resp.serverIp, resp.serverPort);
//Connect("127.0.0.1", 10492);
Connect(resp.serverIp, resp.serverPort);
}
private static void Tick()

View File

@ -359,7 +359,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 });
netReplay.InData(new ReplayStep() { FrameStartID = (int)msg.FrameID, InPut = msg.InputData }, (int)msg.ServerFrameID);
}
public void SendScreen(byte[] RenderBuffer)

View File

@ -52,45 +52,45 @@ namespace AxibugProtobuf {
"YnVmLlByb3RvYnVmX1Jvb21fTWluaUluZm8iSwoVUHJvdG9idWZfU2NyZW5u",
"X0ZyYW1lEg4KBlJvb21JRBgBIAEoBRIPCgdGcmFtZUlEGAIgASgFEhEKCVJh",
"d0JpdG1hcBgDIAEoDCJJCiNQcm90b2J1Zl9Sb29tX1NpbmdsZVBsYXllcklu",
"cHV0RGF0YRIPCgdGcmFtZUlEGAEgASgNEhEKCUlucHV0RGF0YRgCIAEoDSJN",
"cHV0RGF0YRIPCgdGcmFtZUlEGAEgASgNEhEKCUlucHV0RGF0YRgCIAEoDSJk",
"CidQcm90b2J1Zl9Sb29tX1N5bl9Sb29tRnJhbWVBbGxJbnB1dERhdGESDwoH",
"RnJhbWVJRBgBIAEoDRIRCglJbnB1dERhdGEYAiABKAQiVQoUUHJvdG9idWZf",
"Um9vbV9DcmVhdGUSEQoJR2FtZVJvbUlEGAEgASgFEhMKC0dhbWVSb21IYXNo",
"GAIgASgJEhUKD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IRCg1XYWl0UmF3VXBkYXRlEAISDQoJV2FpdFJlYWR5EAMSCQoF",
"UGF1c2UQBBIQCgxJbk9ubGluZUdhbWUQBSpOChFMb2dpblJlc3VsdFN0YXR1",
"cxIhCh1Mb2dpblJlc3VsdFN0YXR1c19CYXNlRGVmYXVsdBAAEgYKAk9LEAES",
"DgoKQWNjb3VudEVychACQgJIAWIGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] {
@ -106,7 +106,7 @@ namespace AxibugProtobuf {
new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Update_RESP), global::AxibugProtobuf.Protobuf_Room_Update_RESP.Parser, new[]{ "UpdateType", "RoomMiniInfo" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Screnn_Frame), global::AxibugProtobuf.Protobuf_Screnn_Frame.Parser, new[]{ "RoomID", "FrameID", "RawBitmap" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_SinglePlayerInputData), global::AxibugProtobuf.Protobuf_Room_SinglePlayerInputData.Parser, new[]{ "FrameID", "InputData" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Syn_RoomFrameAllInputData), global::AxibugProtobuf.Protobuf_Room_Syn_RoomFrameAllInputData.Parser, new[]{ "FrameID", "InputData" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Syn_RoomFrameAllInputData), global::AxibugProtobuf.Protobuf_Room_Syn_RoomFrameAllInputData.Parser, new[]{ "FrameID", "InputData", "ServerFrameID" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Create), global::AxibugProtobuf.Protobuf_Room_Create.Parser, new[]{ "GameRomID", "GameRomHash", "JoinPlayerIdx" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Create_RESP), global::AxibugProtobuf.Protobuf_Room_Create_RESP.Parser, new[]{ "RoomMiniInfo" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Join), global::AxibugProtobuf.Protobuf_Room_Join.Parser, new[]{ "RoomID", "PlayerNum" }, null, null, null, null),
@ -3481,6 +3481,7 @@ namespace AxibugProtobuf {
public Protobuf_Room_Syn_RoomFrameAllInputData(Protobuf_Room_Syn_RoomFrameAllInputData other) : this() {
frameID_ = other.frameID_;
inputData_ = other.inputData_;
serverFrameID_ = other.serverFrameID_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
@ -3517,6 +3518,20 @@ namespace AxibugProtobuf {
}
}
/// <summary>Field number for the "ServerFrameID" field.</summary>
public const int ServerFrameIDFieldNumber = 3;
private uint serverFrameID_;
/// <summary>
///服务器帧编号
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public uint ServerFrameID {
get { return serverFrameID_; }
set {
serverFrameID_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Protobuf_Room_Syn_RoomFrameAllInputData);
@ -3532,6 +3547,7 @@ namespace AxibugProtobuf {
}
if (FrameID != other.FrameID) return false;
if (InputData != other.InputData) return false;
if (ServerFrameID != other.ServerFrameID) return false;
return Equals(_unknownFields, other._unknownFields);
}
@ -3540,6 +3556,7 @@ namespace AxibugProtobuf {
int hash = 1;
if (FrameID != 0) hash ^= FrameID.GetHashCode();
if (InputData != 0UL) hash ^= InputData.GetHashCode();
if (ServerFrameID != 0) hash ^= ServerFrameID.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
@ -3564,6 +3581,10 @@ namespace AxibugProtobuf {
output.WriteRawTag(16);
output.WriteUInt64(InputData);
}
if (ServerFrameID != 0) {
output.WriteRawTag(24);
output.WriteUInt32(ServerFrameID);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
@ -3581,6 +3602,10 @@ namespace AxibugProtobuf {
output.WriteRawTag(16);
output.WriteUInt64(InputData);
}
if (ServerFrameID != 0) {
output.WriteRawTag(24);
output.WriteUInt32(ServerFrameID);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
@ -3596,6 +3621,9 @@ namespace AxibugProtobuf {
if (InputData != 0UL) {
size += 1 + pb::CodedOutputStream.ComputeUInt64Size(InputData);
}
if (ServerFrameID != 0) {
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ServerFrameID);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
@ -3613,6 +3641,9 @@ namespace AxibugProtobuf {
if (other.InputData != 0UL) {
InputData = other.InputData;
}
if (other.ServerFrameID != 0) {
ServerFrameID = other.ServerFrameID;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
@ -3635,6 +3666,10 @@ namespace AxibugProtobuf {
InputData = input.ReadUInt64();
break;
}
case 24: {
ServerFrameID = input.ReadUInt32();
break;
}
}
}
#endif
@ -3657,6 +3692,10 @@ namespace AxibugProtobuf {
InputData = input.ReadUInt64();
break;
}
case 24: {
ServerFrameID = input.ReadUInt32();
break;
}
}
}
}