mirror of
https://github.com/genxium/DelayNoMore
synced 2025-10-09 08:36:52 +00:00
Minor fix.
This commit is contained in:
@@ -1732,6 +1732,7 @@ func (pR *Room) startBattleUdpTunnel() {
|
||||
continue
|
||||
}
|
||||
playerId := pReq.PlayerId
|
||||
Logger.Info(fmt.Sprintf("`BattleUdpTunnel` for roomId=%d received decoded WsReq:", pR.Id), zap.Any("pReq", pReq))
|
||||
if player, exists1 := pR.Players[playerId]; exists1 {
|
||||
authKey := pReq.AuthKey
|
||||
if authKey != player.BattleUdpTunnelAuthKey {
|
||||
|
@@ -571,9 +571,9 @@ type WsReq struct {
|
||||
JoinIndex int32 `protobuf:"varint,4,opt,name=joinIndex,proto3" json:"joinIndex,omitempty"`
|
||||
AckingFrameId int32 `protobuf:"varint,5,opt,name=ackingFrameId,proto3" json:"ackingFrameId,omitempty"`
|
||||
AckingInputFrameId int32 `protobuf:"varint,6,opt,name=ackingInputFrameId,proto3" json:"ackingInputFrameId,omitempty"`
|
||||
InputFrameUpsyncBatch []*InputFrameUpsync `protobuf:"bytes,7,rep,name=inputFrameUpsyncBatch,proto3" json:"inputFrameUpsyncBatch,omitempty"`
|
||||
Hb *HeartbeatUpsync `protobuf:"bytes,8,opt,name=hb,proto3" json:"hb,omitempty"`
|
||||
AuthKey int32 `protobuf:"varint,9,opt,name=authKey,proto3" json:"authKey,omitempty"`
|
||||
AuthKey int32 `protobuf:"varint,7,opt,name=authKey,proto3" json:"authKey,omitempty"`
|
||||
InputFrameUpsyncBatch []*InputFrameUpsync `protobuf:"bytes,8,rep,name=inputFrameUpsyncBatch,proto3" json:"inputFrameUpsyncBatch,omitempty"`
|
||||
Hb *HeartbeatUpsync `protobuf:"bytes,9,opt,name=hb,proto3" json:"hb,omitempty"`
|
||||
}
|
||||
|
||||
func (x *WsReq) Reset() {
|
||||
@@ -650,6 +650,13 @@ func (x *WsReq) GetAckingInputFrameId() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WsReq) GetAuthKey() int32 {
|
||||
if x != nil {
|
||||
return x.AuthKey
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WsReq) GetInputFrameUpsyncBatch() []*InputFrameUpsync {
|
||||
if x != nil {
|
||||
return x.InputFrameUpsyncBatch
|
||||
@@ -664,13 +671,6 @@ func (x *WsReq) GetHb() *HeartbeatUpsync {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *WsReq) GetAuthKey() int32 {
|
||||
if x != nil {
|
||||
return x.AuthKey
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type InputsBufferSnapshot struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -1883,16 +1883,16 @@ var file_room_downsync_frame_proto_rawDesc = []byte{
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x61, 0x63, 0x6b, 0x69, 0x6e,
|
||||
0x67, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x12, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x70, 0x75, 0x74,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68,
|
||||
0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e,
|
||||
0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63,
|
||||
0x52, 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79,
|
||||
0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x27, 0x0a, 0x02, 0x68, 0x62, 0x18, 0x08, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x48, 0x65, 0x61,
|
||||
0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x02, 0x68, 0x62,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x22, 0x9a, 0x02, 0x0a, 0x14, 0x49,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b,
|
||||
0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65,
|
||||
0x79, 0x12, 0x4e, 0x0a, 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55,
|
||||
0x70, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46,
|
||||
0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x15, 0x69, 0x6e, 0x70, 0x75,
|
||||
0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63,
|
||||
0x68, 0x12, 0x27, 0x0a, 0x02, 0x68, 0x62, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74,
|
||||
0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x02, 0x68, 0x62, 0x22, 0x9a, 0x02, 0x0a, 0x14, 0x49,
|
||||
0x6e, 0x70, 0x75, 0x74, 0x73, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73,
|
||||
0x68, 0x6f, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x72,
|
||||
|
Reference in New Issue
Block a user