diff --git a/battle_srv/models/player.go b/battle_srv/models/player.go index 7c1ebd3..1c7c8d4 100644 --- a/battle_srv/models/player.go +++ b/battle_srv/models/player.go @@ -52,7 +52,7 @@ type Player struct { AckingInputFrameId int32 UdpAddr *PeerUdpAddr - BattleUdpTunnelAddr *PeerUdpAddr + BattleUdpTunnelAddr *PeerUdpAddr // This addr is used by backend only, not visible to frontend } func ExistPlayerByName(name string) (bool, error) { diff --git a/battle_srv/models/room.go b/battle_srv/models/room.go index fc5539d..65f4c5f 100644 --- a/battle_srv/models/room.go +++ b/battle_srv/models/room.go @@ -160,6 +160,7 @@ type Room struct { LastIndividuallyConfirmedInputList []uint64 BattleUdpTunnelLock sync.Mutex // Guards "startBattleUdpTunnel" + BattleUdpTunnelAddr *pb.PeerUdpAddr BattleUdpTunnel *net.UDPConn } @@ -829,6 +830,7 @@ func (pR *Room) OnDismissed() { pR.FrameDataLoggingEnabled = false // [WARNING] DON'T ENABLE ON LONG BATTLE DURATION! It consumes A LOT OF MEMORY! pR.BattleUdpTunnelLock.Lock() pR.BattleUdpTunnel = nil + pR.BattleUdpTunnelAddr = nil pR.BattleUdpTunnelLock.Unlock() pR.ChooseStage() @@ -1696,6 +1698,15 @@ func (pR *Room) startBattleUdpTunnel() { panic(err) } pR.BattleUdpTunnel = conn + switch v := conn.LocalAddr().(type) { + case (*net.UDPAddr): + pR.BattleUdpTunnelAddr = &pb.PeerUdpAddr{ + Ip: Conf.Sio.UdpHost, + Port: int32(v.Port), + AuthKey: 0, // To be determined for each specific player upon joining and sent to it by BattleColliderInfo + } + } + pR.BattleUdpTunnelLock.Unlock() defer func() { diff --git a/battle_srv/protos/room_downsync_frame.pb.go b/battle_srv/protos/room_downsync_frame.pb.go index afb1cce..e16bd25 100644 --- a/battle_srv/protos/room_downsync_frame.pb.go +++ b/battle_srv/protos/room_downsync_frame.pb.go @@ -1261,32 +1261,159 @@ func (x *FireballBullet) GetSpeed() int32 { return 0 } +type HolePunchUpsync struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IntAuthToken string `protobuf:"bytes,1,opt,name=intAuthToken,proto3" json:"intAuthToken,omitempty"` + BoundRoomId int32 `protobuf:"varint,2,opt,name=boundRoomId,proto3" json:"boundRoomId,omitempty"` + AuthKey int32 `protobuf:"varint,3,opt,name=authKey,proto3" json:"authKey,omitempty"` +} + +func (x *HolePunchUpsync) Reset() { + *x = HolePunchUpsync{} + if protoimpl.UnsafeEnabled { + mi := &file_room_downsync_frame_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HolePunchUpsync) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HolePunchUpsync) ProtoMessage() {} + +func (x *HolePunchUpsync) ProtoReflect() protoreflect.Message { + mi := &file_room_downsync_frame_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HolePunchUpsync.ProtoReflect.Descriptor instead. +func (*HolePunchUpsync) Descriptor() ([]byte, []int) { + return file_room_downsync_frame_proto_rawDescGZIP(), []int{9} +} + +func (x *HolePunchUpsync) GetIntAuthToken() string { + if x != nil { + return x.IntAuthToken + } + return "" +} + +func (x *HolePunchUpsync) GetBoundRoomId() int32 { + if x != nil { + return x.BoundRoomId + } + return 0 +} + +func (x *HolePunchUpsync) GetAuthKey() int32 { + if x != nil { + return x.AuthKey + } + return 0 +} + +type PeerUdpAddr struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` + Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` + AuthKey int32 `protobuf:"varint,3,opt,name=authKey,proto3" json:"authKey,omitempty"` +} + +func (x *PeerUdpAddr) Reset() { + *x = PeerUdpAddr{} + if protoimpl.UnsafeEnabled { + mi := &file_room_downsync_frame_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PeerUdpAddr) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerUdpAddr) ProtoMessage() {} + +func (x *PeerUdpAddr) ProtoReflect() protoreflect.Message { + mi := &file_room_downsync_frame_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerUdpAddr.ProtoReflect.Descriptor instead. +func (*PeerUdpAddr) Descriptor() ([]byte, []int) { + return file_room_downsync_frame_proto_rawDescGZIP(), []int{10} +} + +func (x *PeerUdpAddr) GetIp() string { + if x != nil { + return x.Ip + } + return "" +} + +func (x *PeerUdpAddr) GetPort() int32 { + if x != nil { + return x.Port + } + return 0 +} + +func (x *PeerUdpAddr) GetAuthKey() int32 { + if x != nil { + return x.AuthKey + } + return 0 +} + type BattleColliderInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - StageName string `protobuf:"bytes,1,opt,name=stageName,proto3" json:"stageName,omitempty"` - IntervalToPing int32 `protobuf:"varint,2,opt,name=intervalToPing,proto3" json:"intervalToPing,omitempty"` - WillKickIfInactiveFor int32 `protobuf:"varint,3,opt,name=willKickIfInactiveFor,proto3" json:"willKickIfInactiveFor,omitempty"` - BoundRoomId int32 `protobuf:"varint,4,opt,name=boundRoomId,proto3" json:"boundRoomId,omitempty"` - BattleDurationNanos int64 `protobuf:"varint,5,opt,name=battleDurationNanos,proto3" json:"battleDurationNanos,omitempty"` - InputFrameUpsyncDelayTolerance int32 `protobuf:"varint,6,opt,name=inputFrameUpsyncDelayTolerance,proto3" json:"inputFrameUpsyncDelayTolerance,omitempty"` - MaxChasingRenderFramesPerUpdate int32 `protobuf:"varint,7,opt,name=maxChasingRenderFramesPerUpdate,proto3" json:"maxChasingRenderFramesPerUpdate,omitempty"` - RollbackEstimatedDtMillis float64 `protobuf:"fixed64,8,opt,name=rollbackEstimatedDtMillis,proto3" json:"rollbackEstimatedDtMillis,omitempty"` - RollbackEstimatedDtNanos int64 `protobuf:"varint,9,opt,name=rollbackEstimatedDtNanos,proto3" json:"rollbackEstimatedDtNanos,omitempty"` - RenderCacheSize int32 `protobuf:"varint,10,opt,name=renderCacheSize,proto3" json:"renderCacheSize,omitempty"` - SpaceOffsetX float64 `protobuf:"fixed64,11,opt,name=spaceOffsetX,proto3" json:"spaceOffsetX,omitempty"` - SpaceOffsetY float64 `protobuf:"fixed64,12,opt,name=spaceOffsetY,proto3" json:"spaceOffsetY,omitempty"` - CollisionMinStep int32 `protobuf:"varint,13,opt,name=collisionMinStep,proto3" json:"collisionMinStep,omitempty"` - BoundRoomCapacity int32 `protobuf:"varint,14,opt,name=boundRoomCapacity,proto3" json:"boundRoomCapacity,omitempty"` - FrameDataLoggingEnabled bool `protobuf:"varint,1024,opt,name=frameDataLoggingEnabled,proto3" json:"frameDataLoggingEnabled,omitempty"` + StageName string `protobuf:"bytes,1,opt,name=stageName,proto3" json:"stageName,omitempty"` + IntervalToPing int32 `protobuf:"varint,2,opt,name=intervalToPing,proto3" json:"intervalToPing,omitempty"` + WillKickIfInactiveFor int32 `protobuf:"varint,3,opt,name=willKickIfInactiveFor,proto3" json:"willKickIfInactiveFor,omitempty"` + BoundRoomId int32 `protobuf:"varint,4,opt,name=boundRoomId,proto3" json:"boundRoomId,omitempty"` + BattleDurationNanos int64 `protobuf:"varint,5,opt,name=battleDurationNanos,proto3" json:"battleDurationNanos,omitempty"` + InputFrameUpsyncDelayTolerance int32 `protobuf:"varint,6,opt,name=inputFrameUpsyncDelayTolerance,proto3" json:"inputFrameUpsyncDelayTolerance,omitempty"` + MaxChasingRenderFramesPerUpdate int32 `protobuf:"varint,7,opt,name=maxChasingRenderFramesPerUpdate,proto3" json:"maxChasingRenderFramesPerUpdate,omitempty"` + RollbackEstimatedDtMillis float64 `protobuf:"fixed64,8,opt,name=rollbackEstimatedDtMillis,proto3" json:"rollbackEstimatedDtMillis,omitempty"` + RollbackEstimatedDtNanos int64 `protobuf:"varint,9,opt,name=rollbackEstimatedDtNanos,proto3" json:"rollbackEstimatedDtNanos,omitempty"` + RenderCacheSize int32 `protobuf:"varint,10,opt,name=renderCacheSize,proto3" json:"renderCacheSize,omitempty"` + SpaceOffsetX float64 `protobuf:"fixed64,11,opt,name=spaceOffsetX,proto3" json:"spaceOffsetX,omitempty"` + SpaceOffsetY float64 `protobuf:"fixed64,12,opt,name=spaceOffsetY,proto3" json:"spaceOffsetY,omitempty"` + CollisionMinStep int32 `protobuf:"varint,13,opt,name=collisionMinStep,proto3" json:"collisionMinStep,omitempty"` + BoundRoomCapacity int32 `protobuf:"varint,14,opt,name=boundRoomCapacity,proto3" json:"boundRoomCapacity,omitempty"` + BattleUdpTunnel *PeerUdpAddr `protobuf:"bytes,15,opt,name=battleUdpTunnel,proto3" json:"battleUdpTunnel,omitempty"` + FrameDataLoggingEnabled bool `protobuf:"varint,1024,opt,name=frameDataLoggingEnabled,proto3" json:"frameDataLoggingEnabled,omitempty"` } func (x *BattleColliderInfo) Reset() { *x = BattleColliderInfo{} if protoimpl.UnsafeEnabled { - mi := &file_room_downsync_frame_proto_msgTypes[9] + mi := &file_room_downsync_frame_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1299,7 +1426,7 @@ func (x *BattleColliderInfo) String() string { func (*BattleColliderInfo) ProtoMessage() {} func (x *BattleColliderInfo) ProtoReflect() protoreflect.Message { - mi := &file_room_downsync_frame_proto_msgTypes[9] + mi := &file_room_downsync_frame_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1312,7 +1439,7 @@ func (x *BattleColliderInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use BattleColliderInfo.ProtoReflect.Descriptor instead. func (*BattleColliderInfo) Descriptor() ([]byte, []int) { - return file_room_downsync_frame_proto_rawDescGZIP(), []int{9} + return file_room_downsync_frame_proto_rawDescGZIP(), []int{11} } func (x *BattleColliderInfo) GetStageName() string { @@ -1413,6 +1540,13 @@ func (x *BattleColliderInfo) GetBoundRoomCapacity() int32 { return 0 } +func (x *BattleColliderInfo) GetBattleUdpTunnel() *PeerUdpAddr { + if x != nil { + return x.BattleUdpTunnel + } + return nil +} + func (x *BattleColliderInfo) GetFrameDataLoggingEnabled() bool { if x != nil { return x.FrameDataLoggingEnabled @@ -1420,132 +1554,6 @@ func (x *BattleColliderInfo) GetFrameDataLoggingEnabled() bool { return false } -type HolePunchUpsync struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - IntAuthToken string `protobuf:"bytes,1,opt,name=intAuthToken,proto3" json:"intAuthToken,omitempty"` - BoundRoomId int32 `protobuf:"varint,2,opt,name=boundRoomId,proto3" json:"boundRoomId,omitempty"` - AuthKey int32 `protobuf:"varint,3,opt,name=authKey,proto3" json:"authKey,omitempty"` -} - -func (x *HolePunchUpsync) Reset() { - *x = HolePunchUpsync{} - if protoimpl.UnsafeEnabled { - mi := &file_room_downsync_frame_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HolePunchUpsync) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HolePunchUpsync) ProtoMessage() {} - -func (x *HolePunchUpsync) ProtoReflect() protoreflect.Message { - mi := &file_room_downsync_frame_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HolePunchUpsync.ProtoReflect.Descriptor instead. -func (*HolePunchUpsync) Descriptor() ([]byte, []int) { - return file_room_downsync_frame_proto_rawDescGZIP(), []int{10} -} - -func (x *HolePunchUpsync) GetIntAuthToken() string { - if x != nil { - return x.IntAuthToken - } - return "" -} - -func (x *HolePunchUpsync) GetBoundRoomId() int32 { - if x != nil { - return x.BoundRoomId - } - return 0 -} - -func (x *HolePunchUpsync) GetAuthKey() int32 { - if x != nil { - return x.AuthKey - } - return 0 -} - -type PeerUdpAddr struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` - Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` - AuthKey int32 `protobuf:"varint,3,opt,name=authKey,proto3" json:"authKey,omitempty"` -} - -func (x *PeerUdpAddr) Reset() { - *x = PeerUdpAddr{} - if protoimpl.UnsafeEnabled { - mi := &file_room_downsync_frame_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PeerUdpAddr) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PeerUdpAddr) ProtoMessage() {} - -func (x *PeerUdpAddr) ProtoReflect() protoreflect.Message { - mi := &file_room_downsync_frame_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PeerUdpAddr.ProtoReflect.Descriptor instead. -func (*PeerUdpAddr) Descriptor() ([]byte, []int) { - return file_room_downsync_frame_proto_rawDescGZIP(), []int{11} -} - -func (x *PeerUdpAddr) GetIp() string { - if x != nil { - return x.Ip - } - return "" -} - -func (x *PeerUdpAddr) GetPort() int32 { - if x != nil { - return x.Port - } - return 0 -} - -func (x *PeerUdpAddr) GetAuthKey() int32 { - if x != nil { - return x.AuthKey - } - return 0 -} - type RoomDownsyncFrame struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2017,7 +2025,19 @@ var file_room_downsync_frame_proto_rawDesc = []byte{ 0x76, 0x65, 0x6c, 0x58, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x76, 0x65, 0x6c, 0x58, 0x12, 0x13, 0x0a, 0x04, 0x76, 0x65, 0x6c, 0x59, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x76, 0x65, 0x6c, 0x59, 0x12, 0x15, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, - 0xed, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x22, 0xf7, 0x05, + 0xed, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x22, 0x71, 0x0a, + 0x0f, 0x48, 0x6f, 0x6c, 0x65, 0x50, 0x75, 0x6e, 0x63, 0x68, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, + 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, + 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, + 0x22, 0x4b, 0x0a, 0x0b, 0x50, 0x65, 0x65, 0x72, 0x55, 0x64, 0x70, 0x41, 0x64, 0x64, 0x72, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x22, 0xb6, 0x06, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, @@ -2061,76 +2081,68 @@ var file_room_downsync_frame_proto_rawDesc = []byte{ 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x12, 0x2c, 0x0a, 0x11, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x52, 0x6f, 0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x17, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x80, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x71, 0x0a, 0x0f, 0x48, 0x6f, 0x6c, 0x65, 0x50, - 0x75, 0x6e, 0x63, 0x68, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, - 0x74, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, - 0x0a, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x22, 0x4b, 0x0a, 0x0b, 0x50, 0x65, - 0x65, 0x72, 0x55, 0x64, 0x70, 0x41, 0x64, 0x64, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x22, 0x82, 0x04, 0x0a, 0x11, 0x52, 0x6f, 0x6f, 0x6d, - 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, - 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x41, 0x72, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x73, 0x41, 0x72, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, - 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x37, 0x0a, - 0x0c, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x6c, - 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x0c, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42, - 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, - 0x6c, 0x6c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, - 0x6c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, - 0x6c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x16, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, - 0x73, 0x6b, 0x18, 0x80, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65, + 0x52, 0x6f, 0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x0f, + 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x55, 0x64, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, + 0x65, 0x65, 0x72, 0x55, 0x64, 0x70, 0x41, 0x64, 0x64, 0x72, 0x52, 0x0f, 0x62, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x55, 0x64, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x39, 0x0a, 0x17, 0x66, + 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x80, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x66, + 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x82, 0x04, 0x0a, 0x11, 0x52, 0x6f, 0x6f, 0x6d, 0x44, + 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0a, + 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x41, 0x72, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x73, 0x41, 0x72, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, + 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x37, 0x0a, 0x0c, + 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x6c, 0x65, + 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x0c, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, + 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, + 0x6c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x6c, + 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x6c, + 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, - 0x6b, 0x12, 0x2d, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x81, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x73, - 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, - 0x12, 0x25, 0x0a, 0x0d, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x4c, 0x69, 0x73, - 0x74, 0x18, 0x82, 0x08, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, - 0x73, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x14, 0x62, 0x75, 0x6c, 0x6c, 0x65, - 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, - 0x83, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c, 0x6f, - 0x63, 0x61, 0x6c, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0f, - 0x70, 0x65, 0x65, 0x72, 0x55, 0x64, 0x70, 0x41, 0x64, 0x64, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, - 0x84, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, - 0x50, 0x65, 0x65, 0x72, 0x55, 0x64, 0x70, 0x41, 0x64, 0x64, 0x72, 0x52, 0x0f, 0x70, 0x65, 0x65, - 0x72, 0x55, 0x64, 0x70, 0x41, 0x64, 0x64, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xaf, 0x02, 0x0a, - 0x06, 0x57, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x63, 0x68, - 0x6f, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, - 0x65, 0x63, 0x68, 0x6f, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, - 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x63, 0x74, 0x12, 0x2b, 0x0a, - 0x03, 0x72, 0x64, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, - 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x03, 0x72, 0x64, 0x66, 0x12, 0x54, 0x0a, 0x17, 0x69, 0x6e, - 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, - 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, - 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x17, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, - 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x36, 0x0a, 0x08, 0x62, 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x74, 0x74, - 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, - 0x62, 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x65, 0x65, 0x72, - 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0d, 0x70, 0x65, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x13, - 0x5a, 0x11, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x73, 0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6b, 0x18, 0x80, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, + 0x12, 0x2d, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x81, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x73, 0x68, + 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x12, + 0x25, 0x0a, 0x0d, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, + 0x18, 0x82, 0x08, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, + 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x14, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x83, + 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c, 0x6f, 0x63, + 0x61, 0x6c, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0f, 0x70, + 0x65, 0x65, 0x72, 0x55, 0x64, 0x70, 0x41, 0x64, 0x64, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x84, + 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, + 0x65, 0x65, 0x72, 0x55, 0x64, 0x70, 0x41, 0x64, 0x64, 0x72, 0x52, 0x0f, 0x70, 0x65, 0x65, 0x72, + 0x55, 0x64, 0x70, 0x41, 0x64, 0x64, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xaf, 0x02, 0x0a, 0x06, + 0x57, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x63, 0x68, 0x6f, + 0x65, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x65, + 0x63, 0x68, 0x6f, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x63, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x63, 0x74, 0x12, 0x2b, 0x0a, 0x03, + 0x72, 0x64, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x73, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, + 0x72, 0x61, 0x6d, 0x65, 0x52, 0x03, 0x72, 0x64, 0x66, 0x12, 0x54, 0x0a, 0x17, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, + 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x17, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, + 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x36, 0x0a, 0x08, 0x62, 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x62, + 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x65, 0x65, 0x72, 0x4a, + 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, + 0x70, 0x65, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x13, 0x5a, + 0x11, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x73, 0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2156,9 +2168,9 @@ var file_room_downsync_frame_proto_goTypes = []interface{}{ (*InputsBufferSnapshot)(nil), // 6: protos.InputsBufferSnapshot (*MeleeBullet)(nil), // 7: protos.MeleeBullet (*FireballBullet)(nil), // 8: protos.FireballBullet - (*BattleColliderInfo)(nil), // 9: protos.BattleColliderInfo - (*HolePunchUpsync)(nil), // 10: protos.HolePunchUpsync - (*PeerUdpAddr)(nil), // 11: protos.PeerUdpAddr + (*HolePunchUpsync)(nil), // 9: protos.HolePunchUpsync + (*PeerUdpAddr)(nil), // 10: protos.PeerUdpAddr + (*BattleColliderInfo)(nil), // 11: protos.BattleColliderInfo (*RoomDownsyncFrame)(nil), // 12: protos.RoomDownsyncFrame (*WsResp)(nil), // 13: protos.WsResp } @@ -2166,18 +2178,19 @@ var file_room_downsync_frame_proto_depIdxs = []int32{ 2, // 0: protos.WsReq.inputFrameUpsyncBatch:type_name -> protos.InputFrameUpsync 4, // 1: protos.WsReq.hb:type_name -> protos.HeartbeatUpsync 3, // 2: protos.InputsBufferSnapshot.toSendInputFrameDownsyncs:type_name -> protos.InputFrameDownsync - 0, // 3: protos.RoomDownsyncFrame.playersArr:type_name -> protos.PlayerDownsync - 7, // 4: protos.RoomDownsyncFrame.meleeBullets:type_name -> protos.MeleeBullet - 8, // 5: protos.RoomDownsyncFrame.fireballBullets:type_name -> protos.FireballBullet - 11, // 6: protos.RoomDownsyncFrame.peerUdpAddrList:type_name -> protos.PeerUdpAddr - 12, // 7: protos.WsResp.rdf:type_name -> protos.RoomDownsyncFrame - 3, // 8: protos.WsResp.inputFrameDownsyncBatch:type_name -> protos.InputFrameDownsync - 9, // 9: protos.WsResp.bciFrame:type_name -> protos.BattleColliderInfo - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 10, // 3: protos.BattleColliderInfo.battleUdpTunnel:type_name -> protos.PeerUdpAddr + 0, // 4: protos.RoomDownsyncFrame.playersArr:type_name -> protos.PlayerDownsync + 7, // 5: protos.RoomDownsyncFrame.meleeBullets:type_name -> protos.MeleeBullet + 8, // 6: protos.RoomDownsyncFrame.fireballBullets:type_name -> protos.FireballBullet + 10, // 7: protos.RoomDownsyncFrame.peerUdpAddrList:type_name -> protos.PeerUdpAddr + 12, // 8: protos.WsResp.rdf:type_name -> protos.RoomDownsyncFrame + 3, // 9: protos.WsResp.inputFrameDownsyncBatch:type_name -> protos.InputFrameDownsync + 11, // 10: protos.WsResp.bciFrame:type_name -> protos.BattleColliderInfo + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_room_downsync_frame_proto_init() } @@ -2295,18 +2308,6 @@ func file_room_downsync_frame_proto_init() { } } file_room_downsync_frame_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BattleColliderInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_room_downsync_frame_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HolePunchUpsync); i { case 0: return &v.state @@ -2318,7 +2319,7 @@ func file_room_downsync_frame_proto_init() { return nil } } - file_room_downsync_frame_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_room_downsync_frame_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerUdpAddr); i { case 0: return &v.state @@ -2330,6 +2331,18 @@ func file_room_downsync_frame_proto_init() { return nil } } + file_room_downsync_frame_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BattleColliderInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } file_room_downsync_frame_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RoomDownsyncFrame); i { case 0: diff --git a/battle_srv/ws/serve.go b/battle_srv/ws/serve.go index 79c0c11..89a2ef3 100644 --- a/battle_srv/ws/serve.go +++ b/battle_srv/ws/serve.go @@ -261,6 +261,12 @@ func Serve(c *gin.Context) { CollisionMinStep: pRoom.CollisionMinStep, BoundRoomCapacity: int32(pRoom.Capacity), + BattleUdpTunnel: &pb.PeerUdpAddr{ + Ip: pRoom.BattleUdpTunnelAddr.Ip, + Port: pRoom.BattleUdpTunnelAddr.Port, + AuthKey: 0, // FIXME: Assign the backend generated authKey for this specific player + }, + FrameDataLoggingEnabled: pRoom.FrameDataLoggingEnabled, } diff --git a/frontend/assets/resources/pbfiles/room_downsync_frame.proto b/frontend/assets/resources/pbfiles/room_downsync_frame.proto index 58a17cc..0adc96c 100644 --- a/frontend/assets/resources/pbfiles/room_downsync_frame.proto +++ b/frontend/assets/resources/pbfiles/room_downsync_frame.proto @@ -165,6 +165,18 @@ message FireballBullet { int32 speed = 1005; } +message HolePunchUpsync { + string intAuthToken = 1; + int32 boundRoomId = 2; + int32 authKey = 3; +} + +message PeerUdpAddr { + string ip = 1; + int32 port = 2; + int32 authKey = 3; +} + message BattleColliderInfo { string stageName = 1; @@ -182,22 +194,11 @@ message BattleColliderInfo { double spaceOffsetY = 12; int32 collisionMinStep = 13; int32 boundRoomCapacity = 14; + PeerUdpAddr battleUdpTunnel = 15; bool frameDataLoggingEnabled = 1024; } -message HolePunchUpsync { - string intAuthToken = 1; - int32 boundRoomId = 2; - int32 authKey = 3; -} - -message PeerUdpAddr { - string ip = 1; - int32 port = 2; - int32 authKey = 3; -} - message RoomDownsyncFrame { int32 id = 1; repeated PlayerDownsync playersArr = 2; diff --git a/frontend/assets/scripts/modules/room_downsync_frame_proto_bundle.forcemsg.js b/frontend/assets/scripts/modules/room_downsync_frame_proto_bundle.forcemsg.js index 3cd7e59..2a652cf 100644 --- a/frontend/assets/scripts/modules/room_downsync_frame_proto_bundle.forcemsg.js +++ b/frontend/assets/scripts/modules/room_downsync_frame_proto_bundle.forcemsg.js @@ -5506,560 +5506,6 @@ $root.protos = (function() { return FireballBullet; })(); - protos.BattleColliderInfo = (function() { - - /** - * Properties of a BattleColliderInfo. - * @memberof protos - * @interface IBattleColliderInfo - * @property {string|null} [stageName] BattleColliderInfo stageName - * @property {number|null} [intervalToPing] BattleColliderInfo intervalToPing - * @property {number|null} [willKickIfInactiveFor] BattleColliderInfo willKickIfInactiveFor - * @property {number|null} [boundRoomId] BattleColliderInfo boundRoomId - * @property {number|Long|null} [battleDurationNanos] BattleColliderInfo battleDurationNanos - * @property {number|null} [inputFrameUpsyncDelayTolerance] BattleColliderInfo inputFrameUpsyncDelayTolerance - * @property {number|null} [maxChasingRenderFramesPerUpdate] BattleColliderInfo maxChasingRenderFramesPerUpdate - * @property {number|null} [rollbackEstimatedDtMillis] BattleColliderInfo rollbackEstimatedDtMillis - * @property {number|Long|null} [rollbackEstimatedDtNanos] BattleColliderInfo rollbackEstimatedDtNanos - * @property {number|null} [renderCacheSize] BattleColliderInfo renderCacheSize - * @property {number|null} [spaceOffsetX] BattleColliderInfo spaceOffsetX - * @property {number|null} [spaceOffsetY] BattleColliderInfo spaceOffsetY - * @property {number|null} [collisionMinStep] BattleColliderInfo collisionMinStep - * @property {number|null} [boundRoomCapacity] BattleColliderInfo boundRoomCapacity - * @property {boolean|null} [frameDataLoggingEnabled] BattleColliderInfo frameDataLoggingEnabled - */ - - /** - * Constructs a new BattleColliderInfo. - * @memberof protos - * @classdesc Represents a BattleColliderInfo. - * @implements IBattleColliderInfo - * @constructor - * @param {protos.IBattleColliderInfo=} [properties] Properties to set - */ - function BattleColliderInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BattleColliderInfo stageName. - * @member {string} stageName - * @memberof protos.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.stageName = ""; - - /** - * BattleColliderInfo intervalToPing. - * @member {number} intervalToPing - * @memberof protos.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.intervalToPing = 0; - - /** - * BattleColliderInfo willKickIfInactiveFor. - * @member {number} willKickIfInactiveFor - * @memberof protos.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.willKickIfInactiveFor = 0; - - /** - * BattleColliderInfo boundRoomId. - * @member {number} boundRoomId - * @memberof protos.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.boundRoomId = 0; - - /** - * BattleColliderInfo battleDurationNanos. - * @member {number|Long} battleDurationNanos - * @memberof protos.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.battleDurationNanos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BattleColliderInfo inputFrameUpsyncDelayTolerance. - * @member {number} inputFrameUpsyncDelayTolerance - * @memberof protos.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.inputFrameUpsyncDelayTolerance = 0; - - /** - * BattleColliderInfo maxChasingRenderFramesPerUpdate. - * @member {number} maxChasingRenderFramesPerUpdate - * @memberof protos.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.maxChasingRenderFramesPerUpdate = 0; - - /** - * BattleColliderInfo rollbackEstimatedDtMillis. - * @member {number} rollbackEstimatedDtMillis - * @memberof protos.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.rollbackEstimatedDtMillis = 0; - - /** - * BattleColliderInfo rollbackEstimatedDtNanos. - * @member {number|Long} rollbackEstimatedDtNanos - * @memberof protos.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.rollbackEstimatedDtNanos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BattleColliderInfo renderCacheSize. - * @member {number} renderCacheSize - * @memberof protos.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.renderCacheSize = 0; - - /** - * BattleColliderInfo spaceOffsetX. - * @member {number} spaceOffsetX - * @memberof protos.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.spaceOffsetX = 0; - - /** - * BattleColliderInfo spaceOffsetY. - * @member {number} spaceOffsetY - * @memberof protos.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.spaceOffsetY = 0; - - /** - * BattleColliderInfo collisionMinStep. - * @member {number} collisionMinStep - * @memberof protos.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.collisionMinStep = 0; - - /** - * BattleColliderInfo boundRoomCapacity. - * @member {number} boundRoomCapacity - * @memberof protos.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.boundRoomCapacity = 0; - - /** - * BattleColliderInfo frameDataLoggingEnabled. - * @member {boolean} frameDataLoggingEnabled - * @memberof protos.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.frameDataLoggingEnabled = false; - - /** - * Creates a new BattleColliderInfo instance using the specified properties. - * @function create - * @memberof protos.BattleColliderInfo - * @static - * @param {protos.IBattleColliderInfo=} [properties] Properties to set - * @returns {protos.BattleColliderInfo} BattleColliderInfo instance - */ - BattleColliderInfo.create = function create(properties) { - return new BattleColliderInfo(properties); - }; - - /** - * Encodes the specified BattleColliderInfo message. Does not implicitly {@link protos.BattleColliderInfo.verify|verify} messages. - * @function encode - * @memberof protos.BattleColliderInfo - * @static - * @param {protos.BattleColliderInfo} message BattleColliderInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BattleColliderInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.stageName != null && Object.hasOwnProperty.call(message, "stageName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.stageName); - if (message.intervalToPing != null && Object.hasOwnProperty.call(message, "intervalToPing")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.intervalToPing); - if (message.willKickIfInactiveFor != null && Object.hasOwnProperty.call(message, "willKickIfInactiveFor")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.willKickIfInactiveFor); - if (message.boundRoomId != null && Object.hasOwnProperty.call(message, "boundRoomId")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.boundRoomId); - if (message.battleDurationNanos != null && Object.hasOwnProperty.call(message, "battleDurationNanos")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.battleDurationNanos); - if (message.inputFrameUpsyncDelayTolerance != null && Object.hasOwnProperty.call(message, "inputFrameUpsyncDelayTolerance")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.inputFrameUpsyncDelayTolerance); - if (message.maxChasingRenderFramesPerUpdate != null && Object.hasOwnProperty.call(message, "maxChasingRenderFramesPerUpdate")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.maxChasingRenderFramesPerUpdate); - if (message.rollbackEstimatedDtMillis != null && Object.hasOwnProperty.call(message, "rollbackEstimatedDtMillis")) - writer.uint32(/* id 8, wireType 1 =*/65).double(message.rollbackEstimatedDtMillis); - if (message.rollbackEstimatedDtNanos != null && Object.hasOwnProperty.call(message, "rollbackEstimatedDtNanos")) - writer.uint32(/* id 9, wireType 0 =*/72).int64(message.rollbackEstimatedDtNanos); - if (message.renderCacheSize != null && Object.hasOwnProperty.call(message, "renderCacheSize")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.renderCacheSize); - if (message.spaceOffsetX != null && Object.hasOwnProperty.call(message, "spaceOffsetX")) - writer.uint32(/* id 11, wireType 1 =*/89).double(message.spaceOffsetX); - if (message.spaceOffsetY != null && Object.hasOwnProperty.call(message, "spaceOffsetY")) - writer.uint32(/* id 12, wireType 1 =*/97).double(message.spaceOffsetY); - if (message.collisionMinStep != null && Object.hasOwnProperty.call(message, "collisionMinStep")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.collisionMinStep); - if (message.boundRoomCapacity != null && Object.hasOwnProperty.call(message, "boundRoomCapacity")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.boundRoomCapacity); - if (message.frameDataLoggingEnabled != null && Object.hasOwnProperty.call(message, "frameDataLoggingEnabled")) - writer.uint32(/* id 1024, wireType 0 =*/8192).bool(message.frameDataLoggingEnabled); - return writer; - }; - - /** - * Encodes the specified BattleColliderInfo message, length delimited. Does not implicitly {@link protos.BattleColliderInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof protos.BattleColliderInfo - * @static - * @param {protos.BattleColliderInfo} message BattleColliderInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BattleColliderInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BattleColliderInfo message from the specified reader or buffer. - * @function decode - * @memberof protos.BattleColliderInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {protos.BattleColliderInfo} BattleColliderInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BattleColliderInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protos.BattleColliderInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.stageName = reader.string(); - break; - } - case 2: { - message.intervalToPing = reader.int32(); - break; - } - case 3: { - message.willKickIfInactiveFor = reader.int32(); - break; - } - case 4: { - message.boundRoomId = reader.int32(); - break; - } - case 5: { - message.battleDurationNanos = reader.int64(); - break; - } - case 6: { - message.inputFrameUpsyncDelayTolerance = reader.int32(); - break; - } - case 7: { - message.maxChasingRenderFramesPerUpdate = reader.int32(); - break; - } - case 8: { - message.rollbackEstimatedDtMillis = reader.double(); - break; - } - case 9: { - message.rollbackEstimatedDtNanos = reader.int64(); - break; - } - case 10: { - message.renderCacheSize = reader.int32(); - break; - } - case 11: { - message.spaceOffsetX = reader.double(); - break; - } - case 12: { - message.spaceOffsetY = reader.double(); - break; - } - case 13: { - message.collisionMinStep = reader.int32(); - break; - } - case 14: { - message.boundRoomCapacity = reader.int32(); - break; - } - case 1024: { - message.frameDataLoggingEnabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BattleColliderInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof protos.BattleColliderInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {protos.BattleColliderInfo} BattleColliderInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BattleColliderInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BattleColliderInfo message. - * @function verify - * @memberof protos.BattleColliderInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BattleColliderInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.stageName != null && message.hasOwnProperty("stageName")) - if (!$util.isString(message.stageName)) - return "stageName: string expected"; - if (message.intervalToPing != null && message.hasOwnProperty("intervalToPing")) - if (!$util.isInteger(message.intervalToPing)) - return "intervalToPing: integer expected"; - if (message.willKickIfInactiveFor != null && message.hasOwnProperty("willKickIfInactiveFor")) - if (!$util.isInteger(message.willKickIfInactiveFor)) - return "willKickIfInactiveFor: integer expected"; - if (message.boundRoomId != null && message.hasOwnProperty("boundRoomId")) - if (!$util.isInteger(message.boundRoomId)) - return "boundRoomId: integer expected"; - if (message.battleDurationNanos != null && message.hasOwnProperty("battleDurationNanos")) - if (!$util.isInteger(message.battleDurationNanos) && !(message.battleDurationNanos && $util.isInteger(message.battleDurationNanos.low) && $util.isInteger(message.battleDurationNanos.high))) - return "battleDurationNanos: integer|Long expected"; - if (message.inputFrameUpsyncDelayTolerance != null && message.hasOwnProperty("inputFrameUpsyncDelayTolerance")) - if (!$util.isInteger(message.inputFrameUpsyncDelayTolerance)) - return "inputFrameUpsyncDelayTolerance: integer expected"; - if (message.maxChasingRenderFramesPerUpdate != null && message.hasOwnProperty("maxChasingRenderFramesPerUpdate")) - if (!$util.isInteger(message.maxChasingRenderFramesPerUpdate)) - return "maxChasingRenderFramesPerUpdate: integer expected"; - if (message.rollbackEstimatedDtMillis != null && message.hasOwnProperty("rollbackEstimatedDtMillis")) - if (typeof message.rollbackEstimatedDtMillis !== "number") - return "rollbackEstimatedDtMillis: number expected"; - if (message.rollbackEstimatedDtNanos != null && message.hasOwnProperty("rollbackEstimatedDtNanos")) - if (!$util.isInteger(message.rollbackEstimatedDtNanos) && !(message.rollbackEstimatedDtNanos && $util.isInteger(message.rollbackEstimatedDtNanos.low) && $util.isInteger(message.rollbackEstimatedDtNanos.high))) - return "rollbackEstimatedDtNanos: integer|Long expected"; - if (message.renderCacheSize != null && message.hasOwnProperty("renderCacheSize")) - if (!$util.isInteger(message.renderCacheSize)) - return "renderCacheSize: integer expected"; - if (message.spaceOffsetX != null && message.hasOwnProperty("spaceOffsetX")) - if (typeof message.spaceOffsetX !== "number") - return "spaceOffsetX: number expected"; - if (message.spaceOffsetY != null && message.hasOwnProperty("spaceOffsetY")) - if (typeof message.spaceOffsetY !== "number") - return "spaceOffsetY: number expected"; - if (message.collisionMinStep != null && message.hasOwnProperty("collisionMinStep")) - if (!$util.isInteger(message.collisionMinStep)) - return "collisionMinStep: integer expected"; - if (message.boundRoomCapacity != null && message.hasOwnProperty("boundRoomCapacity")) - if (!$util.isInteger(message.boundRoomCapacity)) - return "boundRoomCapacity: integer expected"; - if (message.frameDataLoggingEnabled != null && message.hasOwnProperty("frameDataLoggingEnabled")) - if (typeof message.frameDataLoggingEnabled !== "boolean") - return "frameDataLoggingEnabled: boolean expected"; - return null; - }; - - /** - * Creates a BattleColliderInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof protos.BattleColliderInfo - * @static - * @param {Object.} object Plain object - * @returns {protos.BattleColliderInfo} BattleColliderInfo - */ - BattleColliderInfo.fromObject = function fromObject(object) { - if (object instanceof $root.protos.BattleColliderInfo) - return object; - var message = new $root.protos.BattleColliderInfo(); - if (object.stageName != null) - message.stageName = String(object.stageName); - if (object.intervalToPing != null) - message.intervalToPing = object.intervalToPing | 0; - if (object.willKickIfInactiveFor != null) - message.willKickIfInactiveFor = object.willKickIfInactiveFor | 0; - if (object.boundRoomId != null) - message.boundRoomId = object.boundRoomId | 0; - if (object.battleDurationNanos != null) - if ($util.Long) - (message.battleDurationNanos = $util.Long.fromValue(object.battleDurationNanos)).unsigned = false; - else if (typeof object.battleDurationNanos === "string") - message.battleDurationNanos = parseInt(object.battleDurationNanos, 10); - else if (typeof object.battleDurationNanos === "number") - message.battleDurationNanos = object.battleDurationNanos; - else if (typeof object.battleDurationNanos === "object") - message.battleDurationNanos = new $util.LongBits(object.battleDurationNanos.low >>> 0, object.battleDurationNanos.high >>> 0).toNumber(); - if (object.inputFrameUpsyncDelayTolerance != null) - message.inputFrameUpsyncDelayTolerance = object.inputFrameUpsyncDelayTolerance | 0; - if (object.maxChasingRenderFramesPerUpdate != null) - message.maxChasingRenderFramesPerUpdate = object.maxChasingRenderFramesPerUpdate | 0; - if (object.rollbackEstimatedDtMillis != null) - message.rollbackEstimatedDtMillis = Number(object.rollbackEstimatedDtMillis); - if (object.rollbackEstimatedDtNanos != null) - if ($util.Long) - (message.rollbackEstimatedDtNanos = $util.Long.fromValue(object.rollbackEstimatedDtNanos)).unsigned = false; - else if (typeof object.rollbackEstimatedDtNanos === "string") - message.rollbackEstimatedDtNanos = parseInt(object.rollbackEstimatedDtNanos, 10); - else if (typeof object.rollbackEstimatedDtNanos === "number") - message.rollbackEstimatedDtNanos = object.rollbackEstimatedDtNanos; - else if (typeof object.rollbackEstimatedDtNanos === "object") - message.rollbackEstimatedDtNanos = new $util.LongBits(object.rollbackEstimatedDtNanos.low >>> 0, object.rollbackEstimatedDtNanos.high >>> 0).toNumber(); - if (object.renderCacheSize != null) - message.renderCacheSize = object.renderCacheSize | 0; - if (object.spaceOffsetX != null) - message.spaceOffsetX = Number(object.spaceOffsetX); - if (object.spaceOffsetY != null) - message.spaceOffsetY = Number(object.spaceOffsetY); - if (object.collisionMinStep != null) - message.collisionMinStep = object.collisionMinStep | 0; - if (object.boundRoomCapacity != null) - message.boundRoomCapacity = object.boundRoomCapacity | 0; - if (object.frameDataLoggingEnabled != null) - message.frameDataLoggingEnabled = Boolean(object.frameDataLoggingEnabled); - return message; - }; - - /** - * Creates a plain object from a BattleColliderInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof protos.BattleColliderInfo - * @static - * @param {protos.BattleColliderInfo} message BattleColliderInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BattleColliderInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.stageName = ""; - object.intervalToPing = 0; - object.willKickIfInactiveFor = 0; - object.boundRoomId = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.battleDurationNanos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.battleDurationNanos = options.longs === String ? "0" : 0; - object.inputFrameUpsyncDelayTolerance = 0; - object.maxChasingRenderFramesPerUpdate = 0; - object.rollbackEstimatedDtMillis = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.rollbackEstimatedDtNanos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.rollbackEstimatedDtNanos = options.longs === String ? "0" : 0; - object.renderCacheSize = 0; - object.spaceOffsetX = 0; - object.spaceOffsetY = 0; - object.collisionMinStep = 0; - object.boundRoomCapacity = 0; - object.frameDataLoggingEnabled = false; - } - if (message.stageName != null && message.hasOwnProperty("stageName")) - object.stageName = message.stageName; - if (message.intervalToPing != null && message.hasOwnProperty("intervalToPing")) - object.intervalToPing = message.intervalToPing; - if (message.willKickIfInactiveFor != null && message.hasOwnProperty("willKickIfInactiveFor")) - object.willKickIfInactiveFor = message.willKickIfInactiveFor; - if (message.boundRoomId != null && message.hasOwnProperty("boundRoomId")) - object.boundRoomId = message.boundRoomId; - if (message.battleDurationNanos != null && message.hasOwnProperty("battleDurationNanos")) - if (typeof message.battleDurationNanos === "number") - object.battleDurationNanos = options.longs === String ? String(message.battleDurationNanos) : message.battleDurationNanos; - else - object.battleDurationNanos = options.longs === String ? $util.Long.prototype.toString.call(message.battleDurationNanos) : options.longs === Number ? new $util.LongBits(message.battleDurationNanos.low >>> 0, message.battleDurationNanos.high >>> 0).toNumber() : message.battleDurationNanos; - if (message.inputFrameUpsyncDelayTolerance != null && message.hasOwnProperty("inputFrameUpsyncDelayTolerance")) - object.inputFrameUpsyncDelayTolerance = message.inputFrameUpsyncDelayTolerance; - if (message.maxChasingRenderFramesPerUpdate != null && message.hasOwnProperty("maxChasingRenderFramesPerUpdate")) - object.maxChasingRenderFramesPerUpdate = message.maxChasingRenderFramesPerUpdate; - if (message.rollbackEstimatedDtMillis != null && message.hasOwnProperty("rollbackEstimatedDtMillis")) - object.rollbackEstimatedDtMillis = options.json && !isFinite(message.rollbackEstimatedDtMillis) ? String(message.rollbackEstimatedDtMillis) : message.rollbackEstimatedDtMillis; - if (message.rollbackEstimatedDtNanos != null && message.hasOwnProperty("rollbackEstimatedDtNanos")) - if (typeof message.rollbackEstimatedDtNanos === "number") - object.rollbackEstimatedDtNanos = options.longs === String ? String(message.rollbackEstimatedDtNanos) : message.rollbackEstimatedDtNanos; - else - object.rollbackEstimatedDtNanos = options.longs === String ? $util.Long.prototype.toString.call(message.rollbackEstimatedDtNanos) : options.longs === Number ? new $util.LongBits(message.rollbackEstimatedDtNanos.low >>> 0, message.rollbackEstimatedDtNanos.high >>> 0).toNumber() : message.rollbackEstimatedDtNanos; - if (message.renderCacheSize != null && message.hasOwnProperty("renderCacheSize")) - object.renderCacheSize = message.renderCacheSize; - if (message.spaceOffsetX != null && message.hasOwnProperty("spaceOffsetX")) - object.spaceOffsetX = options.json && !isFinite(message.spaceOffsetX) ? String(message.spaceOffsetX) : message.spaceOffsetX; - if (message.spaceOffsetY != null && message.hasOwnProperty("spaceOffsetY")) - object.spaceOffsetY = options.json && !isFinite(message.spaceOffsetY) ? String(message.spaceOffsetY) : message.spaceOffsetY; - if (message.collisionMinStep != null && message.hasOwnProperty("collisionMinStep")) - object.collisionMinStep = message.collisionMinStep; - if (message.boundRoomCapacity != null && message.hasOwnProperty("boundRoomCapacity")) - object.boundRoomCapacity = message.boundRoomCapacity; - if (message.frameDataLoggingEnabled != null && message.hasOwnProperty("frameDataLoggingEnabled")) - object.frameDataLoggingEnabled = message.frameDataLoggingEnabled; - return object; - }; - - /** - * Converts this BattleColliderInfo to JSON. - * @function toJSON - * @memberof protos.BattleColliderInfo - * @instance - * @returns {Object.} JSON object - */ - BattleColliderInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BattleColliderInfo - * @function getTypeUrl - * @memberof protos.BattleColliderInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BattleColliderInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/protos.BattleColliderInfo"; - }; - - return BattleColliderInfo; - })(); - protos.HolePunchUpsync = (function() { /** @@ -6560,6 +6006,588 @@ $root.protos = (function() { return PeerUdpAddr; })(); + protos.BattleColliderInfo = (function() { + + /** + * Properties of a BattleColliderInfo. + * @memberof protos + * @interface IBattleColliderInfo + * @property {string|null} [stageName] BattleColliderInfo stageName + * @property {number|null} [intervalToPing] BattleColliderInfo intervalToPing + * @property {number|null} [willKickIfInactiveFor] BattleColliderInfo willKickIfInactiveFor + * @property {number|null} [boundRoomId] BattleColliderInfo boundRoomId + * @property {number|Long|null} [battleDurationNanos] BattleColliderInfo battleDurationNanos + * @property {number|null} [inputFrameUpsyncDelayTolerance] BattleColliderInfo inputFrameUpsyncDelayTolerance + * @property {number|null} [maxChasingRenderFramesPerUpdate] BattleColliderInfo maxChasingRenderFramesPerUpdate + * @property {number|null} [rollbackEstimatedDtMillis] BattleColliderInfo rollbackEstimatedDtMillis + * @property {number|Long|null} [rollbackEstimatedDtNanos] BattleColliderInfo rollbackEstimatedDtNanos + * @property {number|null} [renderCacheSize] BattleColliderInfo renderCacheSize + * @property {number|null} [spaceOffsetX] BattleColliderInfo spaceOffsetX + * @property {number|null} [spaceOffsetY] BattleColliderInfo spaceOffsetY + * @property {number|null} [collisionMinStep] BattleColliderInfo collisionMinStep + * @property {number|null} [boundRoomCapacity] BattleColliderInfo boundRoomCapacity + * @property {protos.PeerUdpAddr|null} [battleUdpTunnel] BattleColliderInfo battleUdpTunnel + * @property {boolean|null} [frameDataLoggingEnabled] BattleColliderInfo frameDataLoggingEnabled + */ + + /** + * Constructs a new BattleColliderInfo. + * @memberof protos + * @classdesc Represents a BattleColliderInfo. + * @implements IBattleColliderInfo + * @constructor + * @param {protos.IBattleColliderInfo=} [properties] Properties to set + */ + function BattleColliderInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BattleColliderInfo stageName. + * @member {string} stageName + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.stageName = ""; + + /** + * BattleColliderInfo intervalToPing. + * @member {number} intervalToPing + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.intervalToPing = 0; + + /** + * BattleColliderInfo willKickIfInactiveFor. + * @member {number} willKickIfInactiveFor + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.willKickIfInactiveFor = 0; + + /** + * BattleColliderInfo boundRoomId. + * @member {number} boundRoomId + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.boundRoomId = 0; + + /** + * BattleColliderInfo battleDurationNanos. + * @member {number|Long} battleDurationNanos + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.battleDurationNanos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BattleColliderInfo inputFrameUpsyncDelayTolerance. + * @member {number} inputFrameUpsyncDelayTolerance + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.inputFrameUpsyncDelayTolerance = 0; + + /** + * BattleColliderInfo maxChasingRenderFramesPerUpdate. + * @member {number} maxChasingRenderFramesPerUpdate + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.maxChasingRenderFramesPerUpdate = 0; + + /** + * BattleColliderInfo rollbackEstimatedDtMillis. + * @member {number} rollbackEstimatedDtMillis + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.rollbackEstimatedDtMillis = 0; + + /** + * BattleColliderInfo rollbackEstimatedDtNanos. + * @member {number|Long} rollbackEstimatedDtNanos + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.rollbackEstimatedDtNanos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BattleColliderInfo renderCacheSize. + * @member {number} renderCacheSize + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.renderCacheSize = 0; + + /** + * BattleColliderInfo spaceOffsetX. + * @member {number} spaceOffsetX + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.spaceOffsetX = 0; + + /** + * BattleColliderInfo spaceOffsetY. + * @member {number} spaceOffsetY + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.spaceOffsetY = 0; + + /** + * BattleColliderInfo collisionMinStep. + * @member {number} collisionMinStep + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.collisionMinStep = 0; + + /** + * BattleColliderInfo boundRoomCapacity. + * @member {number} boundRoomCapacity + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.boundRoomCapacity = 0; + + /** + * BattleColliderInfo battleUdpTunnel. + * @member {protos.PeerUdpAddr|null|undefined} battleUdpTunnel + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.battleUdpTunnel = null; + + /** + * BattleColliderInfo frameDataLoggingEnabled. + * @member {boolean} frameDataLoggingEnabled + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.frameDataLoggingEnabled = false; + + /** + * Creates a new BattleColliderInfo instance using the specified properties. + * @function create + * @memberof protos.BattleColliderInfo + * @static + * @param {protos.IBattleColliderInfo=} [properties] Properties to set + * @returns {protos.BattleColliderInfo} BattleColliderInfo instance + */ + BattleColliderInfo.create = function create(properties) { + return new BattleColliderInfo(properties); + }; + + /** + * Encodes the specified BattleColliderInfo message. Does not implicitly {@link protos.BattleColliderInfo.verify|verify} messages. + * @function encode + * @memberof protos.BattleColliderInfo + * @static + * @param {protos.BattleColliderInfo} message BattleColliderInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BattleColliderInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stageName != null && Object.hasOwnProperty.call(message, "stageName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.stageName); + if (message.intervalToPing != null && Object.hasOwnProperty.call(message, "intervalToPing")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.intervalToPing); + if (message.willKickIfInactiveFor != null && Object.hasOwnProperty.call(message, "willKickIfInactiveFor")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.willKickIfInactiveFor); + if (message.boundRoomId != null && Object.hasOwnProperty.call(message, "boundRoomId")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.boundRoomId); + if (message.battleDurationNanos != null && Object.hasOwnProperty.call(message, "battleDurationNanos")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.battleDurationNanos); + if (message.inputFrameUpsyncDelayTolerance != null && Object.hasOwnProperty.call(message, "inputFrameUpsyncDelayTolerance")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.inputFrameUpsyncDelayTolerance); + if (message.maxChasingRenderFramesPerUpdate != null && Object.hasOwnProperty.call(message, "maxChasingRenderFramesPerUpdate")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.maxChasingRenderFramesPerUpdate); + if (message.rollbackEstimatedDtMillis != null && Object.hasOwnProperty.call(message, "rollbackEstimatedDtMillis")) + writer.uint32(/* id 8, wireType 1 =*/65).double(message.rollbackEstimatedDtMillis); + if (message.rollbackEstimatedDtNanos != null && Object.hasOwnProperty.call(message, "rollbackEstimatedDtNanos")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.rollbackEstimatedDtNanos); + if (message.renderCacheSize != null && Object.hasOwnProperty.call(message, "renderCacheSize")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.renderCacheSize); + if (message.spaceOffsetX != null && Object.hasOwnProperty.call(message, "spaceOffsetX")) + writer.uint32(/* id 11, wireType 1 =*/89).double(message.spaceOffsetX); + if (message.spaceOffsetY != null && Object.hasOwnProperty.call(message, "spaceOffsetY")) + writer.uint32(/* id 12, wireType 1 =*/97).double(message.spaceOffsetY); + if (message.collisionMinStep != null && Object.hasOwnProperty.call(message, "collisionMinStep")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.collisionMinStep); + if (message.boundRoomCapacity != null && Object.hasOwnProperty.call(message, "boundRoomCapacity")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.boundRoomCapacity); + if (message.battleUdpTunnel != null && Object.hasOwnProperty.call(message, "battleUdpTunnel")) + $root.protos.PeerUdpAddr.encode(message.battleUdpTunnel, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.frameDataLoggingEnabled != null && Object.hasOwnProperty.call(message, "frameDataLoggingEnabled")) + writer.uint32(/* id 1024, wireType 0 =*/8192).bool(message.frameDataLoggingEnabled); + return writer; + }; + + /** + * Encodes the specified BattleColliderInfo message, length delimited. Does not implicitly {@link protos.BattleColliderInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof protos.BattleColliderInfo + * @static + * @param {protos.BattleColliderInfo} message BattleColliderInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BattleColliderInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BattleColliderInfo message from the specified reader or buffer. + * @function decode + * @memberof protos.BattleColliderInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {protos.BattleColliderInfo} BattleColliderInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BattleColliderInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protos.BattleColliderInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.stageName = reader.string(); + break; + } + case 2: { + message.intervalToPing = reader.int32(); + break; + } + case 3: { + message.willKickIfInactiveFor = reader.int32(); + break; + } + case 4: { + message.boundRoomId = reader.int32(); + break; + } + case 5: { + message.battleDurationNanos = reader.int64(); + break; + } + case 6: { + message.inputFrameUpsyncDelayTolerance = reader.int32(); + break; + } + case 7: { + message.maxChasingRenderFramesPerUpdate = reader.int32(); + break; + } + case 8: { + message.rollbackEstimatedDtMillis = reader.double(); + break; + } + case 9: { + message.rollbackEstimatedDtNanos = reader.int64(); + break; + } + case 10: { + message.renderCacheSize = reader.int32(); + break; + } + case 11: { + message.spaceOffsetX = reader.double(); + break; + } + case 12: { + message.spaceOffsetY = reader.double(); + break; + } + case 13: { + message.collisionMinStep = reader.int32(); + break; + } + case 14: { + message.boundRoomCapacity = reader.int32(); + break; + } + case 15: { + message.battleUdpTunnel = $root.protos.PeerUdpAddr.decode(reader, reader.uint32()); + break; + } + case 1024: { + message.frameDataLoggingEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BattleColliderInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof protos.BattleColliderInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {protos.BattleColliderInfo} BattleColliderInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BattleColliderInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BattleColliderInfo message. + * @function verify + * @memberof protos.BattleColliderInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BattleColliderInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.stageName != null && message.hasOwnProperty("stageName")) + if (!$util.isString(message.stageName)) + return "stageName: string expected"; + if (message.intervalToPing != null && message.hasOwnProperty("intervalToPing")) + if (!$util.isInteger(message.intervalToPing)) + return "intervalToPing: integer expected"; + if (message.willKickIfInactiveFor != null && message.hasOwnProperty("willKickIfInactiveFor")) + if (!$util.isInteger(message.willKickIfInactiveFor)) + return "willKickIfInactiveFor: integer expected"; + if (message.boundRoomId != null && message.hasOwnProperty("boundRoomId")) + if (!$util.isInteger(message.boundRoomId)) + return "boundRoomId: integer expected"; + if (message.battleDurationNanos != null && message.hasOwnProperty("battleDurationNanos")) + if (!$util.isInteger(message.battleDurationNanos) && !(message.battleDurationNanos && $util.isInteger(message.battleDurationNanos.low) && $util.isInteger(message.battleDurationNanos.high))) + return "battleDurationNanos: integer|Long expected"; + if (message.inputFrameUpsyncDelayTolerance != null && message.hasOwnProperty("inputFrameUpsyncDelayTolerance")) + if (!$util.isInteger(message.inputFrameUpsyncDelayTolerance)) + return "inputFrameUpsyncDelayTolerance: integer expected"; + if (message.maxChasingRenderFramesPerUpdate != null && message.hasOwnProperty("maxChasingRenderFramesPerUpdate")) + if (!$util.isInteger(message.maxChasingRenderFramesPerUpdate)) + return "maxChasingRenderFramesPerUpdate: integer expected"; + if (message.rollbackEstimatedDtMillis != null && message.hasOwnProperty("rollbackEstimatedDtMillis")) + if (typeof message.rollbackEstimatedDtMillis !== "number") + return "rollbackEstimatedDtMillis: number expected"; + if (message.rollbackEstimatedDtNanos != null && message.hasOwnProperty("rollbackEstimatedDtNanos")) + if (!$util.isInteger(message.rollbackEstimatedDtNanos) && !(message.rollbackEstimatedDtNanos && $util.isInteger(message.rollbackEstimatedDtNanos.low) && $util.isInteger(message.rollbackEstimatedDtNanos.high))) + return "rollbackEstimatedDtNanos: integer|Long expected"; + if (message.renderCacheSize != null && message.hasOwnProperty("renderCacheSize")) + if (!$util.isInteger(message.renderCacheSize)) + return "renderCacheSize: integer expected"; + if (message.spaceOffsetX != null && message.hasOwnProperty("spaceOffsetX")) + if (typeof message.spaceOffsetX !== "number") + return "spaceOffsetX: number expected"; + if (message.spaceOffsetY != null && message.hasOwnProperty("spaceOffsetY")) + if (typeof message.spaceOffsetY !== "number") + return "spaceOffsetY: number expected"; + if (message.collisionMinStep != null && message.hasOwnProperty("collisionMinStep")) + if (!$util.isInteger(message.collisionMinStep)) + return "collisionMinStep: integer expected"; + if (message.boundRoomCapacity != null && message.hasOwnProperty("boundRoomCapacity")) + if (!$util.isInteger(message.boundRoomCapacity)) + return "boundRoomCapacity: integer expected"; + if (message.battleUdpTunnel != null && message.hasOwnProperty("battleUdpTunnel")) { + var error = $root.protos.PeerUdpAddr.verify(message.battleUdpTunnel); + if (error) + return "battleUdpTunnel." + error; + } + if (message.frameDataLoggingEnabled != null && message.hasOwnProperty("frameDataLoggingEnabled")) + if (typeof message.frameDataLoggingEnabled !== "boolean") + return "frameDataLoggingEnabled: boolean expected"; + return null; + }; + + /** + * Creates a BattleColliderInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof protos.BattleColliderInfo + * @static + * @param {Object.} object Plain object + * @returns {protos.BattleColliderInfo} BattleColliderInfo + */ + BattleColliderInfo.fromObject = function fromObject(object) { + if (object instanceof $root.protos.BattleColliderInfo) + return object; + var message = new $root.protos.BattleColliderInfo(); + if (object.stageName != null) + message.stageName = String(object.stageName); + if (object.intervalToPing != null) + message.intervalToPing = object.intervalToPing | 0; + if (object.willKickIfInactiveFor != null) + message.willKickIfInactiveFor = object.willKickIfInactiveFor | 0; + if (object.boundRoomId != null) + message.boundRoomId = object.boundRoomId | 0; + if (object.battleDurationNanos != null) + if ($util.Long) + (message.battleDurationNanos = $util.Long.fromValue(object.battleDurationNanos)).unsigned = false; + else if (typeof object.battleDurationNanos === "string") + message.battleDurationNanos = parseInt(object.battleDurationNanos, 10); + else if (typeof object.battleDurationNanos === "number") + message.battleDurationNanos = object.battleDurationNanos; + else if (typeof object.battleDurationNanos === "object") + message.battleDurationNanos = new $util.LongBits(object.battleDurationNanos.low >>> 0, object.battleDurationNanos.high >>> 0).toNumber(); + if (object.inputFrameUpsyncDelayTolerance != null) + message.inputFrameUpsyncDelayTolerance = object.inputFrameUpsyncDelayTolerance | 0; + if (object.maxChasingRenderFramesPerUpdate != null) + message.maxChasingRenderFramesPerUpdate = object.maxChasingRenderFramesPerUpdate | 0; + if (object.rollbackEstimatedDtMillis != null) + message.rollbackEstimatedDtMillis = Number(object.rollbackEstimatedDtMillis); + if (object.rollbackEstimatedDtNanos != null) + if ($util.Long) + (message.rollbackEstimatedDtNanos = $util.Long.fromValue(object.rollbackEstimatedDtNanos)).unsigned = false; + else if (typeof object.rollbackEstimatedDtNanos === "string") + message.rollbackEstimatedDtNanos = parseInt(object.rollbackEstimatedDtNanos, 10); + else if (typeof object.rollbackEstimatedDtNanos === "number") + message.rollbackEstimatedDtNanos = object.rollbackEstimatedDtNanos; + else if (typeof object.rollbackEstimatedDtNanos === "object") + message.rollbackEstimatedDtNanos = new $util.LongBits(object.rollbackEstimatedDtNanos.low >>> 0, object.rollbackEstimatedDtNanos.high >>> 0).toNumber(); + if (object.renderCacheSize != null) + message.renderCacheSize = object.renderCacheSize | 0; + if (object.spaceOffsetX != null) + message.spaceOffsetX = Number(object.spaceOffsetX); + if (object.spaceOffsetY != null) + message.spaceOffsetY = Number(object.spaceOffsetY); + if (object.collisionMinStep != null) + message.collisionMinStep = object.collisionMinStep | 0; + if (object.boundRoomCapacity != null) + message.boundRoomCapacity = object.boundRoomCapacity | 0; + if (object.battleUdpTunnel != null) { + if (typeof object.battleUdpTunnel !== "object") + throw TypeError(".protos.BattleColliderInfo.battleUdpTunnel: object expected"); + message.battleUdpTunnel = $root.protos.PeerUdpAddr.fromObject(object.battleUdpTunnel); + } + if (object.frameDataLoggingEnabled != null) + message.frameDataLoggingEnabled = Boolean(object.frameDataLoggingEnabled); + return message; + }; + + /** + * Creates a plain object from a BattleColliderInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof protos.BattleColliderInfo + * @static + * @param {protos.BattleColliderInfo} message BattleColliderInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BattleColliderInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.stageName = ""; + object.intervalToPing = 0; + object.willKickIfInactiveFor = 0; + object.boundRoomId = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.battleDurationNanos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.battleDurationNanos = options.longs === String ? "0" : 0; + object.inputFrameUpsyncDelayTolerance = 0; + object.maxChasingRenderFramesPerUpdate = 0; + object.rollbackEstimatedDtMillis = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rollbackEstimatedDtNanos = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rollbackEstimatedDtNanos = options.longs === String ? "0" : 0; + object.renderCacheSize = 0; + object.spaceOffsetX = 0; + object.spaceOffsetY = 0; + object.collisionMinStep = 0; + object.boundRoomCapacity = 0; + object.battleUdpTunnel = null; + object.frameDataLoggingEnabled = false; + } + if (message.stageName != null && message.hasOwnProperty("stageName")) + object.stageName = message.stageName; + if (message.intervalToPing != null && message.hasOwnProperty("intervalToPing")) + object.intervalToPing = message.intervalToPing; + if (message.willKickIfInactiveFor != null && message.hasOwnProperty("willKickIfInactiveFor")) + object.willKickIfInactiveFor = message.willKickIfInactiveFor; + if (message.boundRoomId != null && message.hasOwnProperty("boundRoomId")) + object.boundRoomId = message.boundRoomId; + if (message.battleDurationNanos != null && message.hasOwnProperty("battleDurationNanos")) + if (typeof message.battleDurationNanos === "number") + object.battleDurationNanos = options.longs === String ? String(message.battleDurationNanos) : message.battleDurationNanos; + else + object.battleDurationNanos = options.longs === String ? $util.Long.prototype.toString.call(message.battleDurationNanos) : options.longs === Number ? new $util.LongBits(message.battleDurationNanos.low >>> 0, message.battleDurationNanos.high >>> 0).toNumber() : message.battleDurationNanos; + if (message.inputFrameUpsyncDelayTolerance != null && message.hasOwnProperty("inputFrameUpsyncDelayTolerance")) + object.inputFrameUpsyncDelayTolerance = message.inputFrameUpsyncDelayTolerance; + if (message.maxChasingRenderFramesPerUpdate != null && message.hasOwnProperty("maxChasingRenderFramesPerUpdate")) + object.maxChasingRenderFramesPerUpdate = message.maxChasingRenderFramesPerUpdate; + if (message.rollbackEstimatedDtMillis != null && message.hasOwnProperty("rollbackEstimatedDtMillis")) + object.rollbackEstimatedDtMillis = options.json && !isFinite(message.rollbackEstimatedDtMillis) ? String(message.rollbackEstimatedDtMillis) : message.rollbackEstimatedDtMillis; + if (message.rollbackEstimatedDtNanos != null && message.hasOwnProperty("rollbackEstimatedDtNanos")) + if (typeof message.rollbackEstimatedDtNanos === "number") + object.rollbackEstimatedDtNanos = options.longs === String ? String(message.rollbackEstimatedDtNanos) : message.rollbackEstimatedDtNanos; + else + object.rollbackEstimatedDtNanos = options.longs === String ? $util.Long.prototype.toString.call(message.rollbackEstimatedDtNanos) : options.longs === Number ? new $util.LongBits(message.rollbackEstimatedDtNanos.low >>> 0, message.rollbackEstimatedDtNanos.high >>> 0).toNumber() : message.rollbackEstimatedDtNanos; + if (message.renderCacheSize != null && message.hasOwnProperty("renderCacheSize")) + object.renderCacheSize = message.renderCacheSize; + if (message.spaceOffsetX != null && message.hasOwnProperty("spaceOffsetX")) + object.spaceOffsetX = options.json && !isFinite(message.spaceOffsetX) ? String(message.spaceOffsetX) : message.spaceOffsetX; + if (message.spaceOffsetY != null && message.hasOwnProperty("spaceOffsetY")) + object.spaceOffsetY = options.json && !isFinite(message.spaceOffsetY) ? String(message.spaceOffsetY) : message.spaceOffsetY; + if (message.collisionMinStep != null && message.hasOwnProperty("collisionMinStep")) + object.collisionMinStep = message.collisionMinStep; + if (message.boundRoomCapacity != null && message.hasOwnProperty("boundRoomCapacity")) + object.boundRoomCapacity = message.boundRoomCapacity; + if (message.battleUdpTunnel != null && message.hasOwnProperty("battleUdpTunnel")) + object.battleUdpTunnel = $root.protos.PeerUdpAddr.toObject(message.battleUdpTunnel, options); + if (message.frameDataLoggingEnabled != null && message.hasOwnProperty("frameDataLoggingEnabled")) + object.frameDataLoggingEnabled = message.frameDataLoggingEnabled; + return object; + }; + + /** + * Converts this BattleColliderInfo to JSON. + * @function toJSON + * @memberof protos.BattleColliderInfo + * @instance + * @returns {Object.} JSON object + */ + BattleColliderInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BattleColliderInfo + * @function getTypeUrl + * @memberof protos.BattleColliderInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BattleColliderInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/protos.BattleColliderInfo"; + }; + + return BattleColliderInfo; + })(); + protos.RoomDownsyncFrame = (function() { /**