From 4d1de44ee5e202fb679b9dd7a5a87f3c3b845a9c Mon Sep 17 00:00:00 2001 From: genxium Date: Sun, 2 Oct 2022 11:33:40 +0800 Subject: [PATCH] Updated config uniformity. --- battle_srv/models/pb_type_convert.go | 30 +- battle_srv/models/room.go | 130 +++--- battle_srv/models/room_heap_manager.go | 39 +- .../pb_output/room_downsync_frame.pb.go | 428 ++++++++++------- battle_srv/ws/serve.go | 24 +- frontend/assets/plugin_scripts/constants.js | 1 - .../pbfiles/room_downsync_frame.proto | 27 +- frontend/assets/scenes/login.fire | 2 +- frontend/assets/scripts/Map.js | 54 +-- ...om_downsync_frame_proto_bundle.forcemsg.js | 439 ++++++++++++------ 10 files changed, 702 insertions(+), 472 deletions(-) diff --git a/battle_srv/models/pb_type_convert.go b/battle_srv/models/pb_type_convert.go index 2b64bfd..562ff44 100644 --- a/battle_srv/models/pb_type_convert.go +++ b/battle_srv/models/pb_type_convert.go @@ -33,6 +33,14 @@ func toPbVec2DList(modelInstance *Vec2DList) *pb.Vec2DList { return toRet } +func ToPbVec2DListMap(modelInstances map[string]*Vec2DList) map[string]*pb.Vec2DList { + toRet := make(map[string]*pb.Vec2DList, len(modelInstances)) + for k, v := range modelInstances { + toRet[k] = toPbVec2DList(v) + } + return toRet +} + func toPbPolygon2DList(modelInstance *Polygon2DList) *pb.Polygon2DList { toRet := &pb.Polygon2DList{ Polygon2DList: make([]*pb.Polygon2D, len(*modelInstance)), @@ -43,24 +51,10 @@ func toPbPolygon2DList(modelInstance *Polygon2DList) *pb.Polygon2DList { return toRet } -func ToPbStrToBattleColliderInfo(intervalToPing int32, willKickIfInactiveFor int32, boundRoomId int32, stageName string, modelInstance1 StrToVec2DListMap, modelInstance2 StrToPolygon2DListMap, stageDiscreteW int32, stageDiscreteH int32, stageTileW int32, stageTileH int32) *pb.BattleColliderInfo { - toRet := &pb.BattleColliderInfo{ - IntervalToPing: intervalToPing, - WillKickIfInactiveFor: willKickIfInactiveFor, - BoundRoomId: boundRoomId, - StageName: stageName, - StrToVec2DListMap: make(map[string]*pb.Vec2DList, 0), - StrToPolygon2DListMap: make(map[string]*pb.Polygon2DList, 0), - StageDiscreteW: stageDiscreteW, - StageDiscreteH: stageDiscreteH, - StageTileW: stageTileW, - StageTileH: stageTileH, - } - for k, v := range modelInstance1 { - toRet.StrToVec2DListMap[k] = toPbVec2DList(v) - } - for k, v := range modelInstance2 { - toRet.StrToPolygon2DListMap[k] = toPbPolygon2DList(v) +func ToPbPolygon2DListMap(modelInstances map[string]*Polygon2DList) map[string]*pb.Polygon2DList { + toRet := make(map[string]*pb.Polygon2DList, len(modelInstances)) + for k, v := range modelInstances { + toRet[k] = toPbPolygon2DList(v) } return toRet } diff --git a/battle_srv/models/room.go b/battle_srv/models/room.go index 0a972db..de158fa 100644 --- a/battle_srv/models/room.go +++ b/battle_srv/models/room.go @@ -152,8 +152,10 @@ type Room struct { Index int RenderFrameId int32 CurDynamicsRenderFrameId int32 // [WARNING] The dynamics of backend is ALWAYS MOVING FORWARD BY ALL-CONFIRMED INPUTFRAMES (either by upsync or forced), i.e. no rollback - ServerFPS int32 + ServerFps int32 BattleDurationNanos int64 + InputFrameUpsyncDelayTolerance int32 + MaxChasingRenderFramesPerUpdate int32 EffectivePlayerCount int32 DismissalWaitGroup sync.WaitGroup Barriers map[int32]*Barrier @@ -348,9 +350,10 @@ func (pR *Room) EncodeUpsyncCmd(upsyncCmd *pb.InputFrameUpsync) uint64 { } func (pR *Room) AllPlayerInputsBufferString(allDetails bool) string { - s := make([]string, 0) - s = append(s, fmt.Sprintf("{renderFrameId: %v, stInputFrameId: %v, edInputFrameId: %v, lastAllConfirmedInputFrameIdWithChange: %v, lastAllConfirmedInputFrameId: %v}", pR.RenderFrameId, pR.AllPlayerInputsBuffer.StFrameId, pR.AllPlayerInputsBuffer.EdFrameId, pR.LastAllConfirmedInputFrameIdWithChange, pR.LastAllConfirmedInputFrameId)) if allDetails { + // Appending of the array of strings can be very SLOW due to on-demand heap allocation! Use this printing with caution. + s := make([]string, 0) + s = append(s, fmt.Sprintf("{renderFrameId: %v, stInputFrameId: %v, edInputFrameId: %v, lastAllConfirmedInputFrameIdWithChange: %v, lastAllConfirmedInputFrameId: %v}", pR.RenderFrameId, pR.AllPlayerInputsBuffer.StFrameId, pR.AllPlayerInputsBuffer.EdFrameId, pR.LastAllConfirmedInputFrameIdWithChange, pR.LastAllConfirmedInputFrameId)) for playerId, player := range pR.Players { s = append(s, fmt.Sprintf("{playerId: %v, ackingFrameId: %v, ackingInputFrameId: %v, lastSentInputFrameId: %v}", playerId, player.AckingFrameId, player.AckingInputFrameId, player.LastSentInputFrameId)) } @@ -362,9 +365,11 @@ func (pR *Room) AllPlayerInputsBufferString(allDetails bool) string { f := tmp.(*pb.InputFrameDownsync) s = append(s, fmt.Sprintf("{inputFrameId: %v, inputList: %v, confirmedList: %v}", f.InputFrameId, f.InputList, f.ConfirmedList)) } - } - return strings.Join(s, "\n") + return strings.Join(s, "\n") + } else { + return fmt.Sprintf("{renderFrameId: %d, stInputFrameId: %d, edInputFrameId: %d, lastAllConfirmedInputFrameIdWithChange: %d, lastAllConfirmedInputFrameId: %d}", pR.RenderFrameId, pR.AllPlayerInputsBuffer.StFrameId, pR.AllPlayerInputsBuffer.EdFrameId, pR.LastAllConfirmedInputFrameIdWithChange, pR.LastAllConfirmedInputFrameId) + } } func (pR *Room) StartBattle() { @@ -374,7 +379,7 @@ func (pR *Room) StartBattle() { } // Always instantiates a new channel and let the old one die out due to not being retained by any root reference. - nanosPerFrame := 1000000000 / int64(pR.ServerFPS) + nanosPerFrame := 1000000000 / int64(pR.ServerFps) pR.RenderFrameId = 0 // Initialize the "collisionSys" as well as "RenderFrameBuffer" @@ -397,6 +402,7 @@ func (pR *Room) StartBattle() { defer func() { if r := recover(); r != nil { Logger.Error("battleMainLoop, recovery spot#1, recovered from: ", zap.Any("roomId", pR.Id), zap.Any("panic", r)) + pR.StopBattleForSettlement() } Logger.Info("The `battleMainLoop` is stopped for:", zap.Any("roomId", pR.Id)) pR.onBattleStoppedForSettlement() @@ -432,10 +438,6 @@ func (pR *Room) StartBattle() { dynamicsStartedAt := utils.UnixtimeNano() // Apply "all-confirmed inputFrames" to move forward "pR.CurDynamicsRenderFrameId" nextDynamicsRenderFrameId := pR.ConvertToLastUsedRenderFrameId(pR.LastAllConfirmedInputFrameId, pR.InputDelayFrames) - if nextDynamicsRenderFrameId > pR.RenderFrameId { - // [WARNING] DON'T apply dynamics too fast, otherwise upon DOWNSYNC_MSG_ACT_FORCED_RESYNC the frontend would resync itself to a "too advanced frontend.renderFrameId", and then start upsyncing "too advanced inputFrameId". - nextDynamicsRenderFrameId = pR.RenderFrameId - } Logger.Debug(fmt.Sprintf("roomId=%v, room.RenderFrameId=%v, LastAllConfirmedInputFrameId=%v, InputDelayFrames=%v, nextDynamicsRenderFrameId=%v", pR.Id, pR.RenderFrameId, pR.LastAllConfirmedInputFrameId, pR.InputDelayFrames, nextDynamicsRenderFrameId)) pR.applyInputFrameDownsyncDynamics(pR.CurDynamicsRenderFrameId, nextDynamicsRenderFrameId) dynamicsDuration = utils.UnixtimeNano() - dynamicsStartedAt @@ -480,7 +482,12 @@ func (pR *Room) StartBattle() { indiceInJoinIndexBooleanArr := uint32(player.JoinIndex - 1) var joinMask uint64 = (1 << indiceInJoinIndexBooleanArr) if 0 < (unconfirmedMask & joinMask) { - refRenderFrame := pR.RenderFrameBuffer.GetByFrameId(pR.CurDynamicsRenderFrameId).(*pb.RoomDownsyncFrame) + refRenderFrameId := pR.CurDynamicsRenderFrameId + if refRenderFrameId > pR.RenderFrameId { + // [WARNING] To avoid that in good network condition the frontend resyncs itself to a "too advanced frontend.renderFrameId", and then starts upsyncing "too advanced inputFrameId". + refRenderFrameId = pR.RenderFrameId + } + refRenderFrame := pR.RenderFrameBuffer.GetByFrameId(refRenderFrameId).(*pb.RoomDownsyncFrame) pR.sendSafely(refRenderFrame, toSendInputFrames, DOWNSYNC_MSG_ACT_FORCED_RESYNC, playerId) } else { if 0 >= len(toSendInputFrames) { @@ -488,9 +495,9 @@ func (pR *Room) StartBattle() { } pR.sendSafely(nil, toSendInputFrames, DOWNSYNC_MSG_ACT_INPUT_BATCH, playerId) } - if -1 != debugSendingInputFrameId { - Logger.Info("inputFrame lifecycle#4[sent]:", zap.Any("roomId", pR.Id), zap.Any("playerId", playerId), zap.Any("playerAckingInputFrameId", player.AckingInputFrameId), zap.Any("inputFrameId", debugSendingInputFrameId), zap.Any("AllPlayerInputsBuffer", pR.AllPlayerInputsBufferString(false))) - } + if -1 != debugSendingInputFrameId { + Logger.Info("inputFrame lifecycle#4[sent]:", zap.Any("roomId", pR.Id), zap.Any("playerId", playerId), zap.Any("playerAckingInputFrameId", player.AckingInputFrameId), zap.Any("inputFrameId", debugSendingInputFrameId), zap.Any("AllPlayerInputsBuffer", pR.AllPlayerInputsBufferString(false))) + } atomic.StoreInt32(&(pR.Players[playerId].LastSentInputFrameId), candidateToSendInputFrameId-1) } } @@ -504,7 +511,7 @@ func (pR *Room) StartBattle() { f := pR.AllPlayerInputsBuffer.Pop().(*pb.InputFrameDownsync) if pR.inputFrameIdDebuggable(f.InputFrameId) { // Popping of an "inputFrame" would be AFTER its being all being confirmed, because it requires the "inputFrame" to be all acked - Logger.Info("inputFrame lifecycle#5[popped]:", zap.Any("roomId", pR.Id), zap.Any("inputFrameId", f.InputFrameId), zap.Any("StFrameId", pR.AllPlayerInputsBuffer.StFrameId), zap.Any("EdFrameId", pR.AllPlayerInputsBuffer.EdFrameId)) + Logger.Info("inputFrame lifecycle#5[popped]:", zap.Any("roomId", pR.Id), zap.Any("inputFrameId", f.InputFrameId), zap.Any("AllPlayerInputsBuffer", pR.AllPlayerInputsBufferString(false))) } } @@ -681,7 +688,7 @@ func (pR *Room) onBattlePrepare(cb BattleStartCbType) { CountdownNanos: pR.BattleDurationNanos, } - Logger.Info("Sending out frame for RoomBattleState.PREPARE ", zap.Any("battleReadyToStartFrame", battleReadyToStartFrame)) + Logger.Info("Sending out frame for RoomBattleState.PREPARE:", zap.Any("battleReadyToStartFrame", battleReadyToStartFrame)) for _, player := range pR.Players { pR.sendSafely(battleReadyToStartFrame, nil, DOWNSYNC_MSG_ACT_BATTLE_READY_TO_START, player.Id) } @@ -738,10 +745,10 @@ func (pR *Room) Dismiss() { } pR.DismissalWaitGroup.Wait() } - pR.onDismissed() + pR.OnDismissed() } -func (pR *Room) onDismissed() { +func (pR *Room) OnDismissed() { // Always instantiates new HeapRAM blocks and let the old blocks die out due to not being retained by any root reference. pR.Players = make(map[int32]*Player) @@ -749,16 +756,25 @@ func (pR *Room) onDismissed() { pR.CollisionSysMap = make(map[int32]*resolv.Object) pR.PlayerDownsyncSessionDict = make(map[int32]*websocket.Conn) pR.PlayerSignalToCloseDict = make(map[int32]SignalToCloseConnCbType) + pR.JoinIndexBooleanArr = make([]bool, pR.Capacity) + pR.Barriers = make(map[int32]*Barrier) + pR.AllPlayerInputsBuffer = NewRingBuffer(1024) + pR.RenderFrameBuffer = NewRingBuffer(1024) pR.LastAllConfirmedInputFrameId = -1 pR.LastAllConfirmedInputFrameIdWithChange = -1 pR.LastAllConfirmedInputList = make([]uint64, pR.Capacity) - for indice, _ := range pR.JoinIndexBooleanArr { - pR.JoinIndexBooleanArr[indice] = false - } - pR.AllPlayerInputsBuffer = NewRingBuffer(1024) - pR.RenderFrameBuffer = NewRingBuffer(1024) + pR.RenderFrameId = 0 + pR.CurDynamicsRenderFrameId = 0 + pR.InputDelayFrames = 8 + pR.NstDelayFrames = 32 + pR.InputScaleFrames = uint32(2) + pR.ServerFps = 60 + pR.RollbackEstimatedDt = float64(1.0) / float64(pR.ServerFps) + pR.BattleDurationNanos = int64(30 * 1000 * 1000 * 1000) + pR.InputFrameUpsyncDelayTolerance = 2 + pR.MaxChasingRenderFramesPerUpdate = 10 pR.ChooseStage() pR.EffectivePlayerCount = 0 @@ -917,7 +933,7 @@ func (pR *Room) OnPlayerBattleColliderAcked(playerId int32) bool { } } - // Broadcast added or readded player info to all players in the same room + // Broadcast added or readded player info to all players in the same room for _, eachPlayer := range pR.Players { /* [WARNING] @@ -925,23 +941,23 @@ func (pR *Room) OnPlayerBattleColliderAcked(playerId int32) bool { By making use of the sequential nature of each ws session, all later "RoomDownsyncFrame"s generated after `pRoom.StartBattle()` will be put behind this `playerAckedFrame`. */ - switch targetPlayer.BattleState { - case PlayerBattleStateIns.ADDED_PENDING_BATTLE_COLLIDER_ACK: - playerAckedFrame := &pb.RoomDownsyncFrame{ - Id: pR.RenderFrameId, - Players: toPbPlayers(pR.Players), - PlayerMetas: playerMetas, - } - pR.sendSafely(playerAckedFrame, nil, DOWNSYNC_MSG_ACT_PLAYER_ADDED_AND_ACKED, eachPlayer.Id) - case PlayerBattleStateIns.READDED_PENDING_BATTLE_COLLIDER_ACK: - playerAckedFrame := &pb.RoomDownsyncFrame{ - Id: pR.RenderFrameId, - Players: toPbPlayers(pR.Players), - PlayerMetas: playerMetas, - } - pR.sendSafely(playerAckedFrame, nil, DOWNSYNC_MSG_ACT_PLAYER_READDED_AND_ACKED, eachPlayer.Id) - default: - } + switch targetPlayer.BattleState { + case PlayerBattleStateIns.ADDED_PENDING_BATTLE_COLLIDER_ACK: + playerAckedFrame := &pb.RoomDownsyncFrame{ + Id: pR.RenderFrameId, + Players: toPbPlayers(pR.Players), + PlayerMetas: playerMetas, + } + pR.sendSafely(playerAckedFrame, nil, DOWNSYNC_MSG_ACT_PLAYER_ADDED_AND_ACKED, eachPlayer.Id) + case PlayerBattleStateIns.READDED_PENDING_BATTLE_COLLIDER_ACK: + playerAckedFrame := &pb.RoomDownsyncFrame{ + Id: pR.RenderFrameId, + Players: toPbPlayers(pR.Players), + PlayerMetas: playerMetas, + } + pR.sendSafely(playerAckedFrame, nil, DOWNSYNC_MSG_ACT_PLAYER_READDED_AND_ACKED, eachPlayer.Id) + default: + } } targetPlayer.BattleState = PlayerBattleStateIns.ACTIVE @@ -1038,6 +1054,11 @@ func (pR *Room) forceConfirmationIfApplicable() uint64 { } inputFrameId2 := pR.ConvertToInputFrameId(renderFrameId1, 0) // The inputFrame to force confirmation (if necessary) + if inputFrameId2 < pR.LastAllConfirmedInputFrameId { + // No need to force confirmation, the inputFrames already arrived + Logger.Debug(fmt.Sprintf("inputFrameId2=%v is already all-confirmed for roomId=%v[type#1], no need to force confirmation of it", inputFrameId2, pR.Id)) + return 0 + } tmp := pR.AllPlayerInputsBuffer.GetByFrameId(inputFrameId2) if nil == tmp { panic(fmt.Sprintf("inputFrameId2=%v doesn't exist for roomId=%v, this is abnormal because the server should prefab inputFrameDownsync in a most advanced pace, check the prefab logic! AllPlayerInputsBuffer=%v", inputFrameId2, pR.Id, pR.AllPlayerInputsBufferString(false))) @@ -1047,7 +1068,8 @@ func (pR *Room) forceConfirmationIfApplicable() uint64 { totPlayerCnt := uint32(pR.Capacity) allConfirmedMask := uint64((1 << totPlayerCnt) - 1) if swapped := atomic.CompareAndSwapUint64(&(inputFrame2.ConfirmedList), allConfirmedMask, allConfirmedMask); swapped { - Logger.Info(fmt.Sprintf("inputFrameId2=%v is already all-confirmed for roomId=%v, no need to force confirmation of it", inputFrameId2, pR.Id)) + // This could happen if the frontend upsync command arrived between type#1 and type#2 checks. + Logger.Debug(fmt.Sprintf("inputFrameId2=%v is already all-confirmed for roomId=%v[type#2], no need to force confirmation of it", inputFrameId2, pR.Id)) return 0 } @@ -1093,18 +1115,18 @@ func (pR *Room) applyInputFrameDownsyncDynamics(fromRenderFrameId int32, toRende dx := baseChange * float64(decodedInput[0]) dy := baseChange * float64(decodedInput[1]) /* - // The collision lib seems very slow at worst cases, omitting for now - collisionPlayerIndex := COLLISION_PLAYER_INDEX_PREFIX + joinIndex - playerCollider := pR.CollisionSysMap[collisionPlayerIndex] - if collision := playerCollider.Check(dx, dy, "Barrier"); collision != nil { - changeWithCollision := collision.ContactWithObject(collision.Objects[0]) - dx = changeWithCollision.X() - dy = changeWithCollision.Y() - } - playerCollider.X += dx - playerCollider.Y += dy - // Update in "collision space" - playerCollider.Update() + // The collision lib seems very slow at worst cases, omitting for now + collisionPlayerIndex := COLLISION_PLAYER_INDEX_PREFIX + joinIndex + playerCollider := pR.CollisionSysMap[collisionPlayerIndex] + if collision := playerCollider.Check(dx, dy, "Barrier"); collision != nil { + changeWithCollision := collision.ContactWithObject(collision.Objects[0]) + dx = changeWithCollision.X() + dy = changeWithCollision.Y() + } + playerCollider.X += dx + playerCollider.Y += dy + // Update in "collision space" + playerCollider.Update() */ player.Dir.Dx = decodedInput[0] diff --git a/battle_srv/models/room_heap_manager.go b/battle_srv/models/room_heap_manager.go index bd33264..d788f0a 100644 --- a/battle_srv/models/room_heap_manager.go +++ b/battle_srv/models/room_heap_manager.go @@ -3,8 +3,6 @@ package models import ( "container/heap" "fmt" - "github.com/gorilla/websocket" - "github.com/solarlune/resolv" "go.uber.org/zap" . "server/common" "sync" @@ -93,42 +91,13 @@ func InitRoomHeapManager() { for i := 0; i < initialCountOfRooms; i++ { roomCapacity := 2 - joinIndexBooleanArr := make([]bool, roomCapacity) - for index, _ := range joinIndexBooleanArr { - joinIndexBooleanArr[index] = false - } - currentRoomBattleState := RoomBattleStateIns.IDLE pq[i] = &Room{ - Id: int32(i + 1), - Players: make(map[int32]*Player), - PlayersArr: make([]*Player, roomCapacity), - CollisionSysMap: make(map[int32]*resolv.Object), - PlayerDownsyncSessionDict: make(map[int32]*websocket.Conn), - PlayerSignalToCloseDict: make(map[int32]SignalToCloseConnCbType), - Capacity: roomCapacity, - Score: calRoomScore(0, roomCapacity, currentRoomBattleState), - State: currentRoomBattleState, - Index: i, - RenderFrameId: 0, - CurDynamicsRenderFrameId: 0, - EffectivePlayerCount: 0, - //BattleDurationNanos: int64(5 * 1000 * 1000 * 1000), - BattleDurationNanos: int64(30 * 1000 * 1000 * 1000), - ServerFPS: 60, - Barriers: make(map[int32]*Barrier), - AllPlayerInputsBuffer: NewRingBuffer(1024), - RenderFrameBuffer: NewRingBuffer(1024), - LastAllConfirmedInputFrameId: -1, - LastAllConfirmedInputFrameIdWithChange: -1, - LastAllConfirmedInputList: make([]uint64, roomCapacity), - InputDelayFrames: 4, - NstDelayFrames: 8, - InputScaleFrames: 2, - JoinIndexBooleanArr: joinIndexBooleanArr, - RollbackEstimatedDt: float64(1.0) / 60, + Id: int32(i + 1), + Capacity: roomCapacity, + Index: i, } roomMap[pq[i].Id] = pq[i] - pq[i].ChooseStage() + pq[i].OnDismissed() } heap.Init(&pq) RoomHeapManagerIns = &pq diff --git a/battle_srv/pb_output/room_downsync_frame.pb.go b/battle_srv/pb_output/room_downsync_frame.pb.go index 808a826..794e483 100644 --- a/battle_srv/pb_output/room_downsync_frame.pb.go +++ b/battle_srv/pb_output/room_downsync_frame.pb.go @@ -284,16 +284,23 @@ type BattleColliderInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - IntervalToPing int32 `protobuf:"varint,1,opt,name=intervalToPing,proto3" json:"intervalToPing,omitempty"` - WillKickIfInactiveFor int32 `protobuf:"varint,2,opt,name=willKickIfInactiveFor,proto3" json:"willKickIfInactiveFor,omitempty"` - BoundRoomId int32 `protobuf:"varint,3,opt,name=boundRoomId,proto3" json:"boundRoomId,omitempty"` - StageName string `protobuf:"bytes,4,opt,name=stageName,proto3" json:"stageName,omitempty"` - StrToVec2DListMap map[string]*Vec2DList `protobuf:"bytes,5,rep,name=strToVec2DListMap,proto3" json:"strToVec2DListMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StrToPolygon2DListMap map[string]*Polygon2DList `protobuf:"bytes,6,rep,name=strToPolygon2DListMap,proto3" json:"strToPolygon2DListMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StageDiscreteW int32 `protobuf:"varint,7,opt,name=StageDiscreteW,proto3" json:"StageDiscreteW,omitempty"` - StageDiscreteH int32 `protobuf:"varint,8,opt,name=StageDiscreteH,proto3" json:"StageDiscreteH,omitempty"` - StageTileW int32 `protobuf:"varint,9,opt,name=StageTileW,proto3" json:"StageTileW,omitempty"` - StageTileH int32 `protobuf:"varint,10,opt,name=StageTileH,proto3" json:"StageTileH,omitempty"` + StageName string `protobuf:"bytes,1,opt,name=stageName,proto3" json:"stageName,omitempty"` + StrToVec2DListMap map[string]*Vec2DList `protobuf:"bytes,2,rep,name=strToVec2DListMap,proto3" json:"strToVec2DListMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StrToPolygon2DListMap map[string]*Polygon2DList `protobuf:"bytes,3,rep,name=strToPolygon2DListMap,proto3" json:"strToPolygon2DListMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StageDiscreteW int32 `protobuf:"varint,4,opt,name=stageDiscreteW,proto3" json:"stageDiscreteW,omitempty"` + StageDiscreteH int32 `protobuf:"varint,5,opt,name=stageDiscreteH,proto3" json:"stageDiscreteH,omitempty"` + StageTileW int32 `protobuf:"varint,6,opt,name=stageTileW,proto3" json:"stageTileW,omitempty"` + StageTileH int32 `protobuf:"varint,7,opt,name=stageTileH,proto3" json:"stageTileH,omitempty"` + IntervalToPing int32 `protobuf:"varint,8,opt,name=intervalToPing,proto3" json:"intervalToPing,omitempty"` + WillKickIfInactiveFor int32 `protobuf:"varint,9,opt,name=willKickIfInactiveFor,proto3" json:"willKickIfInactiveFor,omitempty"` + BoundRoomId int32 `protobuf:"varint,10,opt,name=boundRoomId,proto3" json:"boundRoomId,omitempty"` + BattleDurationNanos int64 `protobuf:"varint,11,opt,name=battleDurationNanos,proto3" json:"battleDurationNanos,omitempty"` + ServerFps int32 `protobuf:"varint,12,opt,name=serverFps,proto3" json:"serverFps,omitempty"` + InputDelayFrames int32 `protobuf:"varint,13,opt,name=inputDelayFrames,proto3" json:"inputDelayFrames,omitempty"` + InputScaleFrames uint32 `protobuf:"varint,14,opt,name=inputScaleFrames,proto3" json:"inputScaleFrames,omitempty"` + NstDelayFrames int32 `protobuf:"varint,15,opt,name=nstDelayFrames,proto3" json:"nstDelayFrames,omitempty"` + InputFrameUpsyncDelayTolerance int32 `protobuf:"varint,16,opt,name=inputFrameUpsyncDelayTolerance,proto3" json:"inputFrameUpsyncDelayTolerance,omitempty"` + MaxChasingRenderFramesPerUpdate int32 `protobuf:"varint,17,opt,name=maxChasingRenderFramesPerUpdate,proto3" json:"maxChasingRenderFramesPerUpdate,omitempty"` } func (x *BattleColliderInfo) Reset() { @@ -328,27 +335,6 @@ func (*BattleColliderInfo) Descriptor() ([]byte, []int) { return file_room_downsync_frame_proto_rawDescGZIP(), []int{5} } -func (x *BattleColliderInfo) GetIntervalToPing() int32 { - if x != nil { - return x.IntervalToPing - } - return 0 -} - -func (x *BattleColliderInfo) GetWillKickIfInactiveFor() int32 { - if x != nil { - return x.WillKickIfInactiveFor - } - return 0 -} - -func (x *BattleColliderInfo) GetBoundRoomId() int32 { - if x != nil { - return x.BoundRoomId - } - return 0 -} - func (x *BattleColliderInfo) GetStageName() string { if x != nil { return x.StageName @@ -398,6 +384,76 @@ func (x *BattleColliderInfo) GetStageTileH() int32 { return 0 } +func (x *BattleColliderInfo) GetIntervalToPing() int32 { + if x != nil { + return x.IntervalToPing + } + return 0 +} + +func (x *BattleColliderInfo) GetWillKickIfInactiveFor() int32 { + if x != nil { + return x.WillKickIfInactiveFor + } + return 0 +} + +func (x *BattleColliderInfo) GetBoundRoomId() int32 { + if x != nil { + return x.BoundRoomId + } + return 0 +} + +func (x *BattleColliderInfo) GetBattleDurationNanos() int64 { + if x != nil { + return x.BattleDurationNanos + } + return 0 +} + +func (x *BattleColliderInfo) GetServerFps() int32 { + if x != nil { + return x.ServerFps + } + return 0 +} + +func (x *BattleColliderInfo) GetInputDelayFrames() int32 { + if x != nil { + return x.InputDelayFrames + } + return 0 +} + +func (x *BattleColliderInfo) GetInputScaleFrames() uint32 { + if x != nil { + return x.InputScaleFrames + } + return 0 +} + +func (x *BattleColliderInfo) GetNstDelayFrames() int32 { + if x != nil { + return x.NstDelayFrames + } + return 0 +} + +func (x *BattleColliderInfo) GetInputFrameUpsyncDelayTolerance() int32 { + if x != nil { + return x.InputFrameUpsyncDelayTolerance + } + return 0 +} + +func (x *BattleColliderInfo) GetMaxChasingRenderFramesPerUpdate() int32 { + if x != nil { + return x.MaxChasingRenderFramesPerUpdate + } + return 0 +} + type Player struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1049,163 +1105,185 @@ var file_room_downsync_frame_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x32, 0x44, 0x52, 0x0d, 0x70, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x32, 0x44, 0x4c, 0x69, 0x73, - 0x74, 0x22, 0xee, 0x05, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, - 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x50, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x50, 0x69, 0x6e, 0x67, - 0x12, 0x34, 0x0a, 0x15, 0x77, 0x69, 0x6c, 0x6c, 0x4b, 0x69, 0x63, 0x6b, 0x49, 0x66, 0x49, 0x6e, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x15, 0x77, 0x69, 0x6c, 0x6c, 0x4b, 0x69, 0x63, 0x6b, 0x49, 0x66, 0x49, 0x6e, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, - 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x67, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x74, 0x22, 0xd0, 0x08, 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, 0x6d, 0x65, 0x12, 0x68, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x54, 0x6f, 0x56, - 0x65, 0x63, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x65, 0x63, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x74, 0x72, 0x54, 0x6f, 0x56, 0x65, 0x63, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x73, 0x74, 0x72, 0x54, 0x6f, 0x56, 0x65, 0x63, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, 0x12, 0x74, 0x0a, 0x15, 0x73, 0x74, 0x72, 0x54, 0x6f, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, - 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x74, 0x72, 0x54, 0x6f, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x15, 0x73, 0x74, 0x72, 0x54, 0x6f, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x32, 0x44, 0x4c, - 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x44, - 0x69, 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, 0x57, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, - 0x53, 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, 0x57, 0x12, 0x26, - 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, 0x48, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, - 0x63, 0x72, 0x65, 0x74, 0x65, 0x48, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x67, 0x65, 0x54, - 0x69, 0x6c, 0x65, 0x57, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x53, 0x74, 0x61, 0x67, - 0x65, 0x54, 0x69, 0x6c, 0x65, 0x57, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x67, 0x65, 0x54, - 0x69, 0x6c, 0x65, 0x48, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x53, 0x74, 0x61, 0x67, - 0x65, 0x54, 0x69, 0x6c, 0x65, 0x48, 0x1a, 0x60, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x54, 0x6f, 0x56, - 0x65, 0x63, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x78, 0x2e, 0x56, 0x65, 0x63, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x68, 0x0a, 0x1a, 0x53, 0x74, 0x72, 0x54, - 0x6f, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, - 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, - 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, - 0x6e, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x96, 0x02, 0x0a, 0x06, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x0c, 0x0a, - 0x01, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x79, 0x12, 0x2c, 0x0a, 0x03, 0x64, 0x69, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, - 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x69, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x12, 0x20, 0x0a, - 0x0b, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0b, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x2c, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x65, 0x47, 0x6d, 0x74, 0x4d, 0x69, - 0x6c, 0x6c, 0x69, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, - 0x4d, 0x6f, 0x76, 0x65, 0x47, 0x6d, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, - 0x6f, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1c, 0x0a, - 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x88, 0x01, 0x0a, 0x0a, - 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6a, 0x6f, 0x69, - 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x56, 0x0a, 0x10, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, - 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1e, - 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x44, 0x69, 0x72, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x44, 0x69, 0x72, 0x22, 0x7c, - 0x0a, 0x12, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, - 0x73, 0x79, 0x6e, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, - 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x70, 0x75, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x70, - 0x75, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, - 0x6d, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x0f, - 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x12, - 0x28, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x9f, 0x03, 0x0a, 0x11, 0x52, 0x6f, - 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, + 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x67, 0x65, 0x44, + 0x69, 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, 0x57, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, + 0x73, 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, 0x57, 0x12, 0x26, + 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, 0x48, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, + 0x63, 0x72, 0x65, 0x74, 0x65, 0x48, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x54, + 0x69, 0x6c, 0x65, 0x57, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x67, + 0x65, 0x54, 0x69, 0x6c, 0x65, 0x57, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x54, + 0x69, 0x6c, 0x65, 0x48, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x67, + 0x65, 0x54, 0x69, 0x6c, 0x65, 0x48, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x54, 0x6f, 0x50, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x34, + 0x0a, 0x15, 0x77, 0x69, 0x6c, 0x6c, 0x4b, 0x69, 0x63, 0x6b, 0x49, 0x66, 0x49, 0x6e, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x77, + 0x69, 0x6c, 0x6c, 0x4b, 0x69, 0x63, 0x6b, 0x49, 0x66, 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x46, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, + 0x6d, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x13, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x13, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x46, 0x70, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x46, 0x70, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x44, + 0x65, 0x6c, 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, + 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, + 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x26, + 0x0a, 0x0e, 0x6e, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6e, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, + 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x1e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, + 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x54, + 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1e, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, + 0x44, 0x65, 0x6c, 0x61, 0x79, 0x54, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x48, + 0x0a, 0x1f, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1f, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x73, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, + 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x1a, 0x60, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x54, + 0x6f, 0x56, 0x65, 0x63, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x56, 0x65, 0x63, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x68, 0x0a, 0x1a, 0x53, 0x74, + 0x72, 0x54, 0x6f, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x72, 0x65, 0x61, + 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x50, 0x6f, 0x6c, 0x79, + 0x67, 0x6f, 0x6e, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x96, 0x02, 0x0a, 0x06, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x49, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x78, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 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, 0x55, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, - 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, - 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x70, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x1a, 0x53, 0x0a, 0x0c, 0x50, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x72, 0x65, - 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x50, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5b, - 0x0a, 0x10, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xca, 0x02, 0x0a, 0x05, - 0x57, 0x73, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x63, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x63, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6a, 0x6f, 0x69, - 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6a, 0x6f, - 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x63, 0x6b, 0x69, 0x6e, - 0x67, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, - 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 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, 0x57, 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, 0x21, 0x2e, 0x74, - 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 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, 0x30, 0x0a, 0x02, 0x68, 0x62, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x78, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x55, 0x70, - 0x73, 0x79, 0x6e, 0x63, 0x52, 0x02, 0x68, 0x62, 0x22, 0xa4, 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, 0x34, 0x0a, 0x03, 0x72, 0x64, 0x66, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, - 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, - 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x03, 0x72, 0x64, 0x66, 0x12, - 0x5d, 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, 0x23, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x78, 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, 0x3f, - 0x0a, 0x08, 0x62, 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x78, 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, 0x42, - 0x03, 0x5a, 0x01, 0x2e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, + 0x01, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x79, 0x12, 0x2c, 0x0a, 0x03, 0x64, + 0x69, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, + 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x69, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x70, 0x65, + 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x12, + 0x20, 0x0a, 0x0b, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x65, 0x47, 0x6d, 0x74, + 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6c, 0x61, + 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x65, 0x47, 0x6d, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x88, 0x01, + 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6a, 0x6f, + 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6a, + 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x56, 0x0a, 0x10, 0x49, 0x6e, 0x70, 0x75, + 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x22, 0x0a, 0x0c, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, + 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x44, 0x69, 0x72, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x44, 0x69, 0x72, + 0x22, 0x7c, 0x0a, 0x12, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, + 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, + 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x09, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x3b, + 0x0a, 0x0f, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x55, 0x70, 0x73, 0x79, 0x6e, + 0x63, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x9f, 0x03, 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, 0x49, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x78, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, + 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 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, 0x55, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, + 0x74, 0x61, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x74, 0x72, 0x65, 0x61, + 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, + 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x2e, 0x50, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, + 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x1a, 0x53, 0x0a, 0x0c, 0x50, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, + 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x50, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x1a, 0x5b, 0x0a, 0x10, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, + 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, + 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xca, 0x02, + 0x0a, 0x05, 0x57, 0x73, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x63, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x63, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6a, + 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, + 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x63, 0x6b, + 0x69, 0x6e, 0x67, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0d, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 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, + 0x57, 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, 0x21, + 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, + 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, 0x30, 0x0a, 0x02, 0x68, 0x62, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, + 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x02, 0x68, 0x62, 0x22, 0xa4, 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, 0x34, 0x0a, 0x03, 0x72, + 0x64, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, + 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x78, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, + 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x03, 0x72, 0x64, + 0x66, 0x12, 0x5d, 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, 0x23, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x78, 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, 0x3f, 0x0a, 0x08, 0x62, 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x68, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x78, 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, 0x42, 0x03, 0x5a, 0x01, 0x2e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/battle_srv/ws/serve.go b/battle_srv/ws/serve.go index 0f3e9fb..a828025 100644 --- a/battle_srv/ws/serve.go +++ b/battle_srv/ws/serve.go @@ -240,13 +240,33 @@ func Serve(c *gin.Context) { }) }() - playerBattleColliderInfo := models.ToPbStrToBattleColliderInfo(int32(Constants.Ws.IntervalToPing), int32(Constants.Ws.WillKickIfInactiveFor), pRoom.Id, pRoom.StageName, pRoom.RawBattleStrToVec2DListMap, pRoom.RawBattleStrToPolygon2DListMap, pRoom.StageDiscreteW, pRoom.StageDiscreteH, pRoom.StageTileW, pRoom.StageTileH) + // Construct "battleColliderInfo" to downsync + bciFrame := &pb.BattleColliderInfo{ + BoundRoomId: pRoom.Id, + StageName: pRoom.StageName, + StrToVec2DListMap: models.ToPbVec2DListMap(pRoom.RawBattleStrToVec2DListMap), + StrToPolygon2DListMap: models.ToPbPolygon2DListMap(pRoom.RawBattleStrToPolygon2DListMap), + StageDiscreteW: pRoom.StageDiscreteW, + StageDiscreteH: pRoom.StageDiscreteH, + StageTileW: pRoom.StageTileW, + StageTileH: pRoom.StageTileH, + + IntervalToPing: int32(Constants.Ws.IntervalToPing), + WillKickIfInactiveFor: int32(Constants.Ws.WillKickIfInactiveFor), + BattleDurationNanos: pRoom.BattleDurationNanos, + ServerFps: pRoom.ServerFps, + InputDelayFrames: pRoom.InputDelayFrames, + InputScaleFrames: pRoom.InputScaleFrames, + NstDelayFrames: pRoom.NstDelayFrames, + InputFrameUpsyncDelayTolerance: pRoom.InputFrameUpsyncDelayTolerance, + MaxChasingRenderFramesPerUpdate: pRoom.MaxChasingRenderFramesPerUpdate, + } resp := &pb.WsResp{ Ret: int32(Constants.RetCode.Ok), EchoedMsgId: int32(0), Act: models.DOWNSYNC_MSG_ACT_HB_REQ, - BciFrame: playerBattleColliderInfo, + BciFrame: bciFrame, } // Logger.Info("Sending downsync HeartbeatRequirements:", zap.Any("roomId", pRoom.Id), zap.Any("playerId", playerId), zap.Any("resp", resp)) diff --git a/frontend/assets/plugin_scripts/constants.js b/frontend/assets/plugin_scripts/constants.js index fb3d975..c615bab 100644 --- a/frontend/assets/plugin_scripts/constants.js +++ b/frontend/assets/plugin_scripts/constants.js @@ -1,6 +1,5 @@ "use strict"; - var _ROUTE_PATH; function _defineProperty(obj, key, value) { diff --git a/frontend/assets/resources/pbfiles/room_downsync_frame.proto b/frontend/assets/resources/pbfiles/room_downsync_frame.proto index e54f010..d50ebe4 100644 --- a/frontend/assets/resources/pbfiles/room_downsync_frame.proto +++ b/frontend/assets/resources/pbfiles/room_downsync_frame.proto @@ -27,17 +27,24 @@ message Polygon2DList { } message BattleColliderInfo { - int32 intervalToPing = 1; - int32 willKickIfInactiveFor = 2; - int32 boundRoomId = 3; + string stageName = 1; + map strToVec2DListMap = 2; + map strToPolygon2DListMap = 3; + int32 stageDiscreteW = 4; + int32 stageDiscreteH = 5; + int32 stageTileW = 6; + int32 stageTileH = 7; - string stageName = 4; - map strToVec2DListMap = 5; - map strToPolygon2DListMap = 6; - int32 StageDiscreteW = 7; - int32 StageDiscreteH = 8; - int32 StageTileW = 9; - int32 StageTileH = 10; + int32 intervalToPing = 8; + int32 willKickIfInactiveFor = 9; + int32 boundRoomId = 10; + int64 battleDurationNanos = 11; + int32 serverFps = 12; + int32 inputDelayFrames = 13; + uint32 inputScaleFrames = 14; + int32 nstDelayFrames = 15; + int32 inputFrameUpsyncDelayTolerance = 16; + int32 maxChasingRenderFramesPerUpdate = 17; } message Player { diff --git a/frontend/assets/scenes/login.fire b/frontend/assets/scenes/login.fire index a8af76d..6324f99 100644 --- a/frontend/assets/scenes/login.fire +++ b/frontend/assets/scenes/login.fire @@ -440,7 +440,7 @@ "array": [ 0, 0, - 210.43837950571782, + 209.57814771583418, 0, 0, 0, diff --git a/frontend/assets/scripts/Map.js b/frontend/assets/scripts/Map.js index 35d0d5a..739b185 100644 --- a/frontend/assets/scripts/Map.js +++ b/frontend/assets/scripts/Map.js @@ -42,18 +42,6 @@ cc.Class({ type: cc.Prefab, default: null, }, - treasurePrefab: { - type: cc.Prefab, - default: null, - }, - trapPrefab: { - type: cc.Prefab, - default: null, - }, - speedShoePrefab: { - type: cc.Prefab, - default: null, - }, polygonBoundaryBarrierPrefab: { type: cc.Prefab, default: null, @@ -82,10 +70,6 @@ cc.Class({ type: cc.Label, default: null }, - trapBulletPrefab: { - type: cc.Prefab, - default: null - }, resultPanelPrefab: { type: cc.Prefab, default: null @@ -106,10 +90,6 @@ cc.Class({ type: cc.Prefab, default: null }, - guardTowerPrefab: { - type: cc.Prefab, - default: null - }, forceBigEndianFloatingNumDecoding: { default: false, }, @@ -117,22 +97,6 @@ cc.Class({ type: cc.TiledMap, default: null }, - rollbackEstimatedDt: { - type: cc.Float, - default: 1.0/60 - }, - rollbackEstimatedDtMillis: { - type: cc.Float, - default: 1000.0/60 - }, - rollbackEstimatedDtToleranceMillis: { - type: cc.Float, - default: 1.0/60 - }, - maxChasingRenderFramesPerUpdate: { - type: cc.Integer, - default: 10 - }, }, _inputFrameIdDebuggable(inputFrameId) { @@ -352,12 +316,8 @@ cc.Class({ self.renderFrameId = 0; // After battle started self.lastAllConfirmedRenderFrameId = -1; self.lastAllConfirmedInputFrameId = -1; - self.chaserRenderFrameId = -1; // at any moment, "lastAllConfirmedRenderFrameId <= chaserRenderFrameId <= renderFrameId", but "chaserRenderFrameId" would fluctuate according to "handleInputFrameDownsyncBatch" - - self.inputDelayFrames = 4; - self.inputScaleFrames = 2; self.lastUpsyncInputFrameId = -1; - self.inputFrameUpsyncDelayTolerance = 2; + self.chaserRenderFrameId = -1; // at any moment, "lastAllConfirmedRenderFrameId <= chaserRenderFrameId <= renderFrameId", but "chaserRenderFrameId" would fluctuate according to "handleInputFrameDownsyncBatch" self.recentRenderCache = new RingBuffer(1024); @@ -455,10 +415,16 @@ cc.Class({ /** Init required prefab ended. */ - self.clientUpsyncFps = 60; - window.handleBattleColliderInfo = function(parsedBattleColliderInfo) { - self.battleColliderInfo = parsedBattleColliderInfo; + self.inputDelayFrames = parsedBattleColliderInfo.inputDelayFrames; + self.inputScaleFrames = parsedBattleColliderInfo.inputScaleFrames; + self.inputFrameUpsyncDelayTolerance = parsedBattleColliderInfo.inputFrameUpsyncDelayTolerance; + + self.rollbackEstimatedDt = 1.0/parsedBattleColliderInfo.serverFps; + self.rollbackEstimatedDtMillis = 1000.0*self.rollbackEstimatedDt; + self.rollbackEstimatedDtToleranceMillis = self.rollbackEstimatedDtMillis/1000.0; + self.maxChasingRenderFramesPerUpdate = parsedBattleColliderInfo.maxChasingRenderFramesPerUpdate; + const tiledMapIns = self.node.getComponent(cc.TiledMap); const fullPathOfTmxFile = cc.js.formatStr("map/%s/map", parsedBattleColliderInfo.stageName); 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 b79c89c..de4a071 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 @@ -1179,16 +1179,23 @@ $root.treasurehunterx = (function() { * Properties of a BattleColliderInfo. * @memberof treasurehunterx * @interface IBattleColliderInfo - * @property {number|null} [intervalToPing] BattleColliderInfo intervalToPing - * @property {number|null} [willKickIfInactiveFor] BattleColliderInfo willKickIfInactiveFor - * @property {number|null} [boundRoomId] BattleColliderInfo boundRoomId * @property {string|null} [stageName] BattleColliderInfo stageName * @property {Object.|null} [strToVec2DListMap] BattleColliderInfo strToVec2DListMap * @property {Object.|null} [strToPolygon2DListMap] BattleColliderInfo strToPolygon2DListMap - * @property {number|null} [StageDiscreteW] BattleColliderInfo StageDiscreteW - * @property {number|null} [StageDiscreteH] BattleColliderInfo StageDiscreteH - * @property {number|null} [StageTileW] BattleColliderInfo StageTileW - * @property {number|null} [StageTileH] BattleColliderInfo StageTileH + * @property {number|null} [stageDiscreteW] BattleColliderInfo stageDiscreteW + * @property {number|null} [stageDiscreteH] BattleColliderInfo stageDiscreteH + * @property {number|null} [stageTileW] BattleColliderInfo stageTileW + * @property {number|null} [stageTileH] BattleColliderInfo stageTileH + * @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} [serverFps] BattleColliderInfo serverFps + * @property {number|null} [inputDelayFrames] BattleColliderInfo inputDelayFrames + * @property {number|null} [inputScaleFrames] BattleColliderInfo inputScaleFrames + * @property {number|null} [nstDelayFrames] BattleColliderInfo nstDelayFrames + * @property {number|null} [inputFrameUpsyncDelayTolerance] BattleColliderInfo inputFrameUpsyncDelayTolerance + * @property {number|null} [maxChasingRenderFramesPerUpdate] BattleColliderInfo maxChasingRenderFramesPerUpdate */ /** @@ -1208,30 +1215,6 @@ $root.treasurehunterx = (function() { this[keys[i]] = properties[keys[i]]; } - /** - * BattleColliderInfo intervalToPing. - * @member {number} intervalToPing - * @memberof treasurehunterx.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.intervalToPing = 0; - - /** - * BattleColliderInfo willKickIfInactiveFor. - * @member {number} willKickIfInactiveFor - * @memberof treasurehunterx.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.willKickIfInactiveFor = 0; - - /** - * BattleColliderInfo boundRoomId. - * @member {number} boundRoomId - * @memberof treasurehunterx.BattleColliderInfo - * @instance - */ - BattleColliderInfo.prototype.boundRoomId = 0; - /** * BattleColliderInfo stageName. * @member {string} stageName @@ -1257,36 +1240,116 @@ $root.treasurehunterx = (function() { BattleColliderInfo.prototype.strToPolygon2DListMap = $util.emptyObject; /** - * BattleColliderInfo StageDiscreteW. - * @member {number} StageDiscreteW + * BattleColliderInfo stageDiscreteW. + * @member {number} stageDiscreteW * @memberof treasurehunterx.BattleColliderInfo * @instance */ - BattleColliderInfo.prototype.StageDiscreteW = 0; + BattleColliderInfo.prototype.stageDiscreteW = 0; /** - * BattleColliderInfo StageDiscreteH. - * @member {number} StageDiscreteH + * BattleColliderInfo stageDiscreteH. + * @member {number} stageDiscreteH * @memberof treasurehunterx.BattleColliderInfo * @instance */ - BattleColliderInfo.prototype.StageDiscreteH = 0; + BattleColliderInfo.prototype.stageDiscreteH = 0; /** - * BattleColliderInfo StageTileW. - * @member {number} StageTileW + * BattleColliderInfo stageTileW. + * @member {number} stageTileW * @memberof treasurehunterx.BattleColliderInfo * @instance */ - BattleColliderInfo.prototype.StageTileW = 0; + BattleColliderInfo.prototype.stageTileW = 0; /** - * BattleColliderInfo StageTileH. - * @member {number} StageTileH + * BattleColliderInfo stageTileH. + * @member {number} stageTileH * @memberof treasurehunterx.BattleColliderInfo * @instance */ - BattleColliderInfo.prototype.StageTileH = 0; + BattleColliderInfo.prototype.stageTileH = 0; + + /** + * BattleColliderInfo intervalToPing. + * @member {number} intervalToPing + * @memberof treasurehunterx.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.intervalToPing = 0; + + /** + * BattleColliderInfo willKickIfInactiveFor. + * @member {number} willKickIfInactiveFor + * @memberof treasurehunterx.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.willKickIfInactiveFor = 0; + + /** + * BattleColliderInfo boundRoomId. + * @member {number} boundRoomId + * @memberof treasurehunterx.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.boundRoomId = 0; + + /** + * BattleColliderInfo battleDurationNanos. + * @member {number|Long} battleDurationNanos + * @memberof treasurehunterx.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.battleDurationNanos = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BattleColliderInfo serverFps. + * @member {number} serverFps + * @memberof treasurehunterx.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.serverFps = 0; + + /** + * BattleColliderInfo inputDelayFrames. + * @member {number} inputDelayFrames + * @memberof treasurehunterx.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.inputDelayFrames = 0; + + /** + * BattleColliderInfo inputScaleFrames. + * @member {number} inputScaleFrames + * @memberof treasurehunterx.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.inputScaleFrames = 0; + + /** + * BattleColliderInfo nstDelayFrames. + * @member {number} nstDelayFrames + * @memberof treasurehunterx.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.nstDelayFrames = 0; + + /** + * BattleColliderInfo inputFrameUpsyncDelayTolerance. + * @member {number} inputFrameUpsyncDelayTolerance + * @memberof treasurehunterx.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.inputFrameUpsyncDelayTolerance = 0; + + /** + * BattleColliderInfo maxChasingRenderFramesPerUpdate. + * @member {number} maxChasingRenderFramesPerUpdate + * @memberof treasurehunterx.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.maxChasingRenderFramesPerUpdate = 0; /** * Creates a new BattleColliderInfo instance using the specified properties. @@ -1312,32 +1375,46 @@ $root.treasurehunterx = (function() { BattleColliderInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intervalToPing != null && Object.hasOwnProperty.call(message, "intervalToPing")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.intervalToPing); - if (message.willKickIfInactiveFor != null && Object.hasOwnProperty.call(message, "willKickIfInactiveFor")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.willKickIfInactiveFor); - if (message.boundRoomId != null && Object.hasOwnProperty.call(message, "boundRoomId")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.boundRoomId); if (message.stageName != null && Object.hasOwnProperty.call(message, "stageName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.stageName); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.stageName); if (message.strToVec2DListMap != null && Object.hasOwnProperty.call(message, "strToVec2DListMap")) for (var keys = Object.keys(message.strToVec2DListMap), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); $root.treasurehunterx.Vec2DList.encode(message.strToVec2DListMap[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } if (message.strToPolygon2DListMap != null && Object.hasOwnProperty.call(message, "strToPolygon2DListMap")) for (var keys = Object.keys(message.strToPolygon2DListMap), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); $root.treasurehunterx.Polygon2DList.encode(message.strToPolygon2DListMap[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } - if (message.StageDiscreteW != null && Object.hasOwnProperty.call(message, "StageDiscreteW")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.StageDiscreteW); - if (message.StageDiscreteH != null && Object.hasOwnProperty.call(message, "StageDiscreteH")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.StageDiscreteH); - if (message.StageTileW != null && Object.hasOwnProperty.call(message, "StageTileW")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.StageTileW); - if (message.StageTileH != null && Object.hasOwnProperty.call(message, "StageTileH")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.StageTileH); + if (message.stageDiscreteW != null && Object.hasOwnProperty.call(message, "stageDiscreteW")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.stageDiscreteW); + if (message.stageDiscreteH != null && Object.hasOwnProperty.call(message, "stageDiscreteH")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.stageDiscreteH); + if (message.stageTileW != null && Object.hasOwnProperty.call(message, "stageTileW")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.stageTileW); + if (message.stageTileH != null && Object.hasOwnProperty.call(message, "stageTileH")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.stageTileH); + if (message.intervalToPing != null && Object.hasOwnProperty.call(message, "intervalToPing")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.intervalToPing); + if (message.willKickIfInactiveFor != null && Object.hasOwnProperty.call(message, "willKickIfInactiveFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.willKickIfInactiveFor); + if (message.boundRoomId != null && Object.hasOwnProperty.call(message, "boundRoomId")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.boundRoomId); + if (message.battleDurationNanos != null && Object.hasOwnProperty.call(message, "battleDurationNanos")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.battleDurationNanos); + if (message.serverFps != null && Object.hasOwnProperty.call(message, "serverFps")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.serverFps); + if (message.inputDelayFrames != null && Object.hasOwnProperty.call(message, "inputDelayFrames")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.inputDelayFrames); + if (message.inputScaleFrames != null && Object.hasOwnProperty.call(message, "inputScaleFrames")) + writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.inputScaleFrames); + if (message.nstDelayFrames != null && Object.hasOwnProperty.call(message, "nstDelayFrames")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.nstDelayFrames); + if (message.inputFrameUpsyncDelayTolerance != null && Object.hasOwnProperty.call(message, "inputFrameUpsyncDelayTolerance")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.inputFrameUpsyncDelayTolerance); + if (message.maxChasingRenderFramesPerUpdate != null && Object.hasOwnProperty.call(message, "maxChasingRenderFramesPerUpdate")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.maxChasingRenderFramesPerUpdate); return writer; }; @@ -1373,22 +1450,10 @@ $root.treasurehunterx = (function() { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.intervalToPing = reader.int32(); - break; - } - case 2: { - message.willKickIfInactiveFor = reader.int32(); - break; - } - case 3: { - message.boundRoomId = reader.int32(); - break; - } - case 4: { message.stageName = reader.string(); break; } - case 5: { + case 2: { if (message.strToVec2DListMap === $util.emptyObject) message.strToVec2DListMap = {}; var end2 = reader.uint32() + reader.pos; @@ -1411,7 +1476,7 @@ $root.treasurehunterx = (function() { message.strToVec2DListMap[key] = value; break; } - case 6: { + case 3: { if (message.strToPolygon2DListMap === $util.emptyObject) message.strToPolygon2DListMap = {}; var end2 = reader.uint32() + reader.pos; @@ -1434,20 +1499,60 @@ $root.treasurehunterx = (function() { message.strToPolygon2DListMap[key] = value; break; } + case 4: { + message.stageDiscreteW = reader.int32(); + break; + } + case 5: { + message.stageDiscreteH = reader.int32(); + break; + } + case 6: { + message.stageTileW = reader.int32(); + break; + } case 7: { - message.StageDiscreteW = reader.int32(); + message.stageTileH = reader.int32(); break; } case 8: { - message.StageDiscreteH = reader.int32(); + message.intervalToPing = reader.int32(); break; } case 9: { - message.StageTileW = reader.int32(); + message.willKickIfInactiveFor = reader.int32(); break; } case 10: { - message.StageTileH = reader.int32(); + message.boundRoomId = reader.int32(); + break; + } + case 11: { + message.battleDurationNanos = reader.int64(); + break; + } + case 12: { + message.serverFps = reader.int32(); + break; + } + case 13: { + message.inputDelayFrames = reader.int32(); + break; + } + case 14: { + message.inputScaleFrames = reader.uint32(); + break; + } + case 15: { + message.nstDelayFrames = reader.int32(); + break; + } + case 16: { + message.inputFrameUpsyncDelayTolerance = reader.int32(); + break; + } + case 17: { + message.maxChasingRenderFramesPerUpdate = reader.int32(); break; } default: @@ -1485,15 +1590,6 @@ $root.treasurehunterx = (function() { BattleColliderInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object 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.stageName != null && message.hasOwnProperty("stageName")) if (!$util.isString(message.stageName)) return "stageName: string expected"; @@ -1517,18 +1613,48 @@ $root.treasurehunterx = (function() { return "strToPolygon2DListMap." + error; } } - if (message.StageDiscreteW != null && message.hasOwnProperty("StageDiscreteW")) - if (!$util.isInteger(message.StageDiscreteW)) - return "StageDiscreteW: integer expected"; - if (message.StageDiscreteH != null && message.hasOwnProperty("StageDiscreteH")) - if (!$util.isInteger(message.StageDiscreteH)) - return "StageDiscreteH: integer expected"; - if (message.StageTileW != null && message.hasOwnProperty("StageTileW")) - if (!$util.isInteger(message.StageTileW)) - return "StageTileW: integer expected"; - if (message.StageTileH != null && message.hasOwnProperty("StageTileH")) - if (!$util.isInteger(message.StageTileH)) - return "StageTileH: integer expected"; + if (message.stageDiscreteW != null && message.hasOwnProperty("stageDiscreteW")) + if (!$util.isInteger(message.stageDiscreteW)) + return "stageDiscreteW: integer expected"; + if (message.stageDiscreteH != null && message.hasOwnProperty("stageDiscreteH")) + if (!$util.isInteger(message.stageDiscreteH)) + return "stageDiscreteH: integer expected"; + if (message.stageTileW != null && message.hasOwnProperty("stageTileW")) + if (!$util.isInteger(message.stageTileW)) + return "stageTileW: integer expected"; + if (message.stageTileH != null && message.hasOwnProperty("stageTileH")) + if (!$util.isInteger(message.stageTileH)) + return "stageTileH: integer 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.serverFps != null && message.hasOwnProperty("serverFps")) + if (!$util.isInteger(message.serverFps)) + return "serverFps: integer expected"; + if (message.inputDelayFrames != null && message.hasOwnProperty("inputDelayFrames")) + if (!$util.isInteger(message.inputDelayFrames)) + return "inputDelayFrames: integer expected"; + if (message.inputScaleFrames != null && message.hasOwnProperty("inputScaleFrames")) + if (!$util.isInteger(message.inputScaleFrames)) + return "inputScaleFrames: integer expected"; + if (message.nstDelayFrames != null && message.hasOwnProperty("nstDelayFrames")) + if (!$util.isInteger(message.nstDelayFrames)) + return "nstDelayFrames: integer 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"; return null; }; @@ -1544,12 +1670,6 @@ $root.treasurehunterx = (function() { if (object instanceof $root.treasurehunterx.BattleColliderInfo) return object; var message = new $root.treasurehunterx.BattleColliderInfo(); - 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.stageName != null) message.stageName = String(object.stageName); if (object.strToVec2DListMap) { @@ -1572,14 +1692,41 @@ $root.treasurehunterx = (function() { message.strToPolygon2DListMap[keys[i]] = $root.treasurehunterx.Polygon2DList.fromObject(object.strToPolygon2DListMap[keys[i]]); } } - if (object.StageDiscreteW != null) - message.StageDiscreteW = object.StageDiscreteW | 0; - if (object.StageDiscreteH != null) - message.StageDiscreteH = object.StageDiscreteH | 0; - if (object.StageTileW != null) - message.StageTileW = object.StageTileW | 0; - if (object.StageTileH != null) - message.StageTileH = object.StageTileH | 0; + if (object.stageDiscreteW != null) + message.stageDiscreteW = object.stageDiscreteW | 0; + if (object.stageDiscreteH != null) + message.stageDiscreteH = object.stageDiscreteH | 0; + if (object.stageTileW != null) + message.stageTileW = object.stageTileW | 0; + if (object.stageTileH != null) + message.stageTileH = object.stageTileH | 0; + 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.serverFps != null) + message.serverFps = object.serverFps | 0; + if (object.inputDelayFrames != null) + message.inputDelayFrames = object.inputDelayFrames | 0; + if (object.inputScaleFrames != null) + message.inputScaleFrames = object.inputScaleFrames >>> 0; + if (object.nstDelayFrames != null) + message.nstDelayFrames = object.nstDelayFrames | 0; + if (object.inputFrameUpsyncDelayTolerance != null) + message.inputFrameUpsyncDelayTolerance = object.inputFrameUpsyncDelayTolerance | 0; + if (object.maxChasingRenderFramesPerUpdate != null) + message.maxChasingRenderFramesPerUpdate = object.maxChasingRenderFramesPerUpdate | 0; return message; }; @@ -1601,21 +1748,26 @@ $root.treasurehunterx = (function() { object.strToPolygon2DListMap = {}; } if (options.defaults) { + object.stageName = ""; + object.stageDiscreteW = 0; + object.stageDiscreteH = 0; + object.stageTileW = 0; + object.stageTileH = 0; object.intervalToPing = 0; object.willKickIfInactiveFor = 0; object.boundRoomId = 0; - object.stageName = ""; - object.StageDiscreteW = 0; - object.StageDiscreteH = 0; - object.StageTileW = 0; - object.StageTileH = 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.serverFps = 0; + object.inputDelayFrames = 0; + object.inputScaleFrames = 0; + object.nstDelayFrames = 0; + object.inputFrameUpsyncDelayTolerance = 0; + object.maxChasingRenderFramesPerUpdate = 0; } - 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.stageName != null && message.hasOwnProperty("stageName")) object.stageName = message.stageName; var keys2; @@ -1629,14 +1781,37 @@ $root.treasurehunterx = (function() { for (var j = 0; j < keys2.length; ++j) object.strToPolygon2DListMap[keys2[j]] = $root.treasurehunterx.Polygon2DList.toObject(message.strToPolygon2DListMap[keys2[j]], options); } - if (message.StageDiscreteW != null && message.hasOwnProperty("StageDiscreteW")) - object.StageDiscreteW = message.StageDiscreteW; - if (message.StageDiscreteH != null && message.hasOwnProperty("StageDiscreteH")) - object.StageDiscreteH = message.StageDiscreteH; - if (message.StageTileW != null && message.hasOwnProperty("StageTileW")) - object.StageTileW = message.StageTileW; - if (message.StageTileH != null && message.hasOwnProperty("StageTileH")) - object.StageTileH = message.StageTileH; + if (message.stageDiscreteW != null && message.hasOwnProperty("stageDiscreteW")) + object.stageDiscreteW = message.stageDiscreteW; + if (message.stageDiscreteH != null && message.hasOwnProperty("stageDiscreteH")) + object.stageDiscreteH = message.stageDiscreteH; + if (message.stageTileW != null && message.hasOwnProperty("stageTileW")) + object.stageTileW = message.stageTileW; + if (message.stageTileH != null && message.hasOwnProperty("stageTileH")) + object.stageTileH = message.stageTileH; + 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.serverFps != null && message.hasOwnProperty("serverFps")) + object.serverFps = message.serverFps; + if (message.inputDelayFrames != null && message.hasOwnProperty("inputDelayFrames")) + object.inputDelayFrames = message.inputDelayFrames; + if (message.inputScaleFrames != null && message.hasOwnProperty("inputScaleFrames")) + object.inputScaleFrames = message.inputScaleFrames; + if (message.nstDelayFrames != null && message.hasOwnProperty("nstDelayFrames")) + object.nstDelayFrames = message.nstDelayFrames; + if (message.inputFrameUpsyncDelayTolerance != null && message.hasOwnProperty("inputFrameUpsyncDelayTolerance")) + object.inputFrameUpsyncDelayTolerance = message.inputFrameUpsyncDelayTolerance; + if (message.maxChasingRenderFramesPerUpdate != null && message.hasOwnProperty("maxChasingRenderFramesPerUpdate")) + object.maxChasingRenderFramesPerUpdate = message.maxChasingRenderFramesPerUpdate; return object; };