From 2dbc5299786393a8c9d0e8c892e3169ae7d55afc Mon Sep 17 00:00:00 2001 From: yflu Date: Mon, 21 Nov 2022 00:23:01 +0800 Subject: [PATCH] Fixes for jiggling character animation on resynced. --- battle_srv/models/room.go | 84 +- battle_srv/protos/room_downsync_frame.pb.go | 274 ++--- battle_srv/ws/serve.go | 6 +- dnmshared/sharedprotos/geometry.pb.go | 2 +- .../pbfiles/room_downsync_frame.proto | 2 + frontend/assets/scenes/login.fire | 2 +- frontend/assets/scripts/AttackingCharacter.js | 2 + frontend/assets/scripts/Map.js | 9 +- frontend/assets/scripts/TouchEventsManager.js | 2 +- ...om_downsync_frame_proto_bundle.forcemsg.js | 1024 ++++++----------- 10 files changed, 540 insertions(+), 867 deletions(-) diff --git a/battle_srv/models/room.go b/battle_srv/models/room.go index 898db7b..e2e18d7 100644 --- a/battle_srv/models/room.go +++ b/battle_srv/models/room.go @@ -160,23 +160,12 @@ type Room struct { NstDelayFrames int32 // network-single-trip delay in the count of render frames, proposed to be (InputDelayFrames >> 1) because we expect a round-trip delay to be exactly "InputDelayFrames" InputScaleFrames uint32 // inputDelayedAndScaledFrameId = ((originalFrameId - InputDelayFrames) >> InputScaleFrames) JoinIndexBooleanArr []bool - RollbackEstimatedDtMillis float64 - RollbackEstimatedDtNanos int64 - LastRenderFrameIdTriggeredAt int64 - WorldToVirtualGridRatio float64 - VirtualGridToWorldRatio float64 + BackendDynamicsEnabled bool + LastRenderFrameIdTriggeredAt int64 + PlayerDefaultSpeed int32 - PlayerDefaultSpeed int32 - - StageName string - StageDiscreteW int32 - StageDiscreteH int32 - StageTileW int32 - StageTileH int32 - RawBattleStrToVec2DListMap StrToVec2DListMap - RawBattleStrToPolygon2DListMap StrToPolygon2DListMap - BackendDynamicsEnabled bool + BattleColliderInfo // Compositing to send centralized magic numbers } func (pR *Room) updateScore() { @@ -297,7 +286,7 @@ func (pR *Room) ChooseStage() error { DeserializeTsxToColliderDict(pTmxMapIns, byteArrOfTsxFile, int(tileset.FirstGid), gidBoundariesMapInB2World) } - stageDiscreteW, stageDiscreteH, stageTileW, stageTileH, toRetStrToVec2DListMap, toRetStrToPolygon2DListMap, err := ParseTmxLayersAndGroups(pTmxMapIns, gidBoundariesMapInB2World) + stageDiscreteW, stageDiscreteH, stageTileW, stageTileH, strToVec2DListMap, strToPolygon2DListMap, err := ParseTmxLayersAndGroups(pTmxMapIns, gidBoundariesMapInB2World) if nil != err { panic(err) } @@ -306,10 +295,10 @@ func (pR *Room) ChooseStage() error { pR.StageDiscreteH = stageDiscreteH pR.StageTileW = stageTileW pR.StageTileH = stageTileH - pR.RawBattleStrToVec2DListMap = toRetStrToVec2DListMap - pR.RawBattleStrToPolygon2DListMap = toRetStrToPolygon2DListMap + pR.StrToVec2DListMap = strToVec2DListMap + pR.StrToPolygon2DListMap = strToPolygon2DListMap - barrierPolygon2DList := *(toRetStrToPolygon2DListMap["Barrier"]) + barrierPolygon2DList := *(strToPolygon2DListMap["Barrier"]) var barrierLocalIdInBattle int32 = 0 for _, polygon2DUnaligned := range barrierPolygon2DList.Eles { @@ -530,8 +519,8 @@ func (pR *Room) StartBattle() { 2. reconnection */ shouldResync1 := (MAGIC_LAST_SENT_INPUT_FRAME_ID_READDED == player.LastSentInputFrameId) - // shouldResync2 := (0 < (unconfirmedMask & uint64(1 << uint32(player.JoinIndex-1)))) // This condition is critical, if we don't send resync upon this condition, the "reconnected or slowly-clocking player" might never get its input synced - shouldResync2 := (0 < unconfirmedMask) // An easier version of the above, might keep sending "refRenderFrame"s to still connected players when any player is disconnected + shouldResync2 := (0 < (unconfirmedMask & uint64(1<= minLastSentInputFrameId { continue } minLastSentInputFrameId = player.LastSentInputFrameId } - if minLastSentInputFrameId < toApplyInputFrameId { - toApplyInputFrameId = minLastSentInputFrameId + if minLastSentInputFrameId < minToKeepInputFrameId { + minToKeepInputFrameId = minLastSentInputFrameId } - for pR.InputsBuffer.N < pR.InputsBuffer.Cnt || (0 < pR.InputsBuffer.Cnt && pR.InputsBuffer.StFrameId < toApplyInputFrameId) { + for pR.InputsBuffer.N < pR.InputsBuffer.Cnt || (0 < pR.InputsBuffer.Cnt && pR.InputsBuffer.StFrameId < minToKeepInputFrameId) { f := pR.InputsBuffer.Pop().(*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.Debug("inputFrame lifecycle#4[popped]:", zap.Any("roomId", pR.Id), zap.Any("inputFrameId", f.InputFrameId), zap.Any("toApplyInputFrameId", toApplyInputFrameId), zap.Any("InputsBuffer", pR.InputsBufferString(false))) + Logger.Debug("inputFrame lifecycle#4[popped]:", zap.Any("roomId", pR.Id), zap.Any("inputFrameId", f.InputFrameId), zap.Any("minToKeepInputFrameId", minToKeepInputFrameId), zap.Any("InputsBuffer", pR.InputsBufferString(false))) } } @@ -785,6 +777,7 @@ 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.WorldToVirtualGridRatio = float64(1000) pR.VirtualGridToWorldRatio = float64(1.0) / pR.WorldToVirtualGridRatio // this is a one-off computation, should avoid division in iterations + pR.SpAtkLookupFrames = 5 pR.PlayerDefaultSpeed = int32(float64(2) * pR.WorldToVirtualGridRatio) // in virtual grids per frame pR.Players = make(map[int32]*Player) pR.PlayersArr = make([]*Player, pR.Capacity) @@ -812,7 +805,7 @@ func (pR *Room) OnDismissed() { pR.BattleDurationFrames = 30 * pR.ServerFps pR.BattleDurationNanos = int64(pR.BattleDurationFrames) * (pR.RollbackEstimatedDtNanos + 1) pR.InputFrameUpsyncDelayTolerance = 2 - pR.MaxChasingRenderFramesPerUpdate = 5 + pR.MaxChasingRenderFramesPerUpdate = 8 pR.BackendDynamicsEnabled = true // [WARNING] When "false", recovery upon reconnection wouldn't work! @@ -924,7 +917,7 @@ func (pR *Room) onPlayerAdded(playerId int32) { pR.JoinIndexBooleanArr[index] = true // Lazily assign the initial position of "Player" for "RoomDownsyncFrame". - playerPosList := *(pR.RawBattleStrToVec2DListMap["PlayerStartingPos"]) + playerPosList := *(pR.StrToVec2DListMap["PlayerStartingPos"]) if index > len(playerPosList.Eles) { panic(fmt.Sprintf("onPlayerAdded error, index >= len(playerPosList), roomId=%v, playerId=%v, roomState=%v, roomEffectivePlayerCount=%v", pR.Id, playerId, pR.State, pR.EffectivePlayerCount)) } @@ -1085,15 +1078,9 @@ func (pR *Room) prefabInputFrameDownsync(inputFrameId int32) *InputFrameDownsync func (pR *Room) markConfirmationIfApplicable() { inputFrameId1 := pR.LastAllConfirmedInputFrameId + 1 - gap := int32(4) // This value is hardcoded and doesn't need be much bigger, because the backend side is supposed to never lag when "false == BackendDynamicsEnabled". - inputFrameId2 := inputFrameId1 + gap - if inputFrameId2 > pR.InputsBuffer.EdFrameId { - inputFrameId2 = pR.InputsBuffer.EdFrameId - } - totPlayerCnt := uint32(pR.Capacity) allConfirmedMask := uint64((1 << totPlayerCnt) - 1) - for inputFrameId := inputFrameId1; inputFrameId < inputFrameId2; inputFrameId++ { + for inputFrameId := inputFrameId1; inputFrameId < pR.InputsBuffer.EdFrameId; inputFrameId++ { tmp := pR.InputsBuffer.GetByFrameId(inputFrameId) if nil == tmp { panic(fmt.Sprintf("inputFrameId=%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! InputsBuffer=%v", inputFrameId, pR.Id, pR.InputsBufferString(false))) @@ -1107,7 +1094,7 @@ func (pR *Room) markConfirmationIfApplicable() { } inputFrameUpsync := tmp.(*InputFrameUpsync) indiceInJoinIndexBooleanArr := uint32(player.JoinIndex - 1) - inputFrameDownsync.InputList[indiceInJoinIndexBooleanArr] = inputFrameUpsync.Encoded + inputFrameDownsync.InputList[indiceInJoinIndexBooleanArr] = inputFrameUpsync.Encoded inputFrameDownsync.ConfirmedList |= (1 << indiceInJoinIndexBooleanArr) } @@ -1243,11 +1230,8 @@ func (pR *Room) applyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputF // Update in the collision system playerCollider.Update() - if 0 != decodedInput.Dx || 0 != decodedInput.Dy { - Logger.Debug(fmt.Sprintf("Checking collision for playerId=%v: virtual (%d, %d) -> (%d, %d), now playerShape=%v", playerId, currPlayerDownsync.VirtualGridX, currPlayerDownsync.VirtualGridY, newVx, newVy, ConvexPolygonStr(playerCollider.Shape.(*resolv.ConvexPolygon)))) - nextRenderFramePlayers[playerId].Dir.Dx = decodedInput.Dx - nextRenderFramePlayers[playerId].Dir.Dy = decodedInput.Dy - } + nextRenderFramePlayers[playerId].Dir.Dx = decodedInput.Dx + nextRenderFramePlayers[playerId].Dir.Dy = decodedInput.Dy } // handle pushbacks upon collision after all movements treated as simultaneous @@ -1281,20 +1265,20 @@ func (pR *Room) applyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputF nextRenderFramePlayers[playerId].VirtualGridY = newVy } - Logger.Debug(fmt.Sprintf("After applyInputFrameDownsyncDynamicsOnSingleRenderFrame: currRenderFrame.Id=%v, inputList=%v, currRenderFrame.Players=%v, nextRenderFramePlayers=%v, toRet.Players=%v", currRenderFrame.Id, inputList, currRenderFrame.Players, nextRenderFramePlayers, toRet.Players)) + Logger.Debug(fmt.Sprintf("After applyInputFrameDownsyncDynamicsOnSingleRenderFrame: currRenderFrame.Id=%v, inputList=%v, currRenderFrame.Players=%v, nextRenderFramePlayers=%v", currRenderFrame.Id, inputList, currRenderFrame.Players, nextRenderFramePlayers)) } return toRet } func (pR *Room) decodeInput(encodedInput uint64) *InputFrameDecoded { - encodedDirection := (encodedInput & 0xf) - btnALevel := int32((encodedInput >> 4) & 1) - return &InputFrameDecoded{ - Dx: DIRECTION_DECODER[encodedDirection][0], - Dy: DIRECTION_DECODER[encodedDirection][1], - BtnALevel: btnALevel, - } + encodedDirection := (encodedInput & uint64(15)) + btnALevel := int32((encodedInput >> 4) & 1) + return &InputFrameDecoded{ + Dx: DIRECTION_DECODER[encodedDirection][0], + Dy: DIRECTION_DECODER[encodedDirection][1], + BtnALevel: btnALevel, + } } func (pR *Room) inputFrameIdDebuggable(inputFrameId int32) bool { diff --git a/battle_srv/protos/room_downsync_frame.pb.go b/battle_srv/protos/room_downsync_frame.pb.go index 460b3a8..b45eddf 100644 --- a/battle_srv/protos/room_downsync_frame.pb.go +++ b/battle_srv/protos/room_downsync_frame.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.4 +// protoc v3.7.1 // source: room_downsync_frame.proto package protos @@ -48,6 +48,7 @@ type BattleColliderInfo struct { RollbackEstimatedDtNanos int64 `protobuf:"varint,20,opt,name=rollbackEstimatedDtNanos,proto3" json:"rollbackEstimatedDtNanos,omitempty"` WorldToVirtualGridRatio float64 `protobuf:"fixed64,21,opt,name=worldToVirtualGridRatio,proto3" json:"worldToVirtualGridRatio,omitempty"` VirtualGridToWorldRatio float64 `protobuf:"fixed64,22,opt,name=virtualGridToWorldRatio,proto3" json:"virtualGridToWorldRatio,omitempty"` + SpAtkLookupFrames int32 `protobuf:"varint,23,opt,name=spAtkLookupFrames,proto3" json:"spAtkLookupFrames,omitempty"` } func (x *BattleColliderInfo) Reset() { @@ -236,6 +237,13 @@ func (x *BattleColliderInfo) GetVirtualGridToWorldRatio() float64 { return 0 } +func (x *BattleColliderInfo) GetSpAtkLookupFrames() int32 { + if x != nil { + return x.SpAtkLookupFrames + } + return 0 +} + type PlayerDownsync struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -937,7 +945,7 @@ var file_room_downsync_frame_proto_rawDesc = []byte{ 0x0a, 0x19, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x1a, 0x0e, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xd4, 0x0a, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, + 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x0b, 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, 0x5f, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x54, @@ -1010,137 +1018,139 @@ var file_room_downsync_frame_proto_rawDesc = []byte{ 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x54, 0x6f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x16, 0x20, 0x01, 0x28, 0x01, 0x52, 0x17, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x54, 0x6f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x52, - 0x61, 0x74, 0x69, 0x6f, 0x1a, 0x5d, 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, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x56, - 0x65, 0x63, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x65, 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, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x73, 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, 0xc7, 0x02, 0x0a, 0x0e, 0x50, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, - 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x58, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, - 0x58, 0x12, 0x22, 0x0a, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, - 0x59, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, - 0x47, 0x72, 0x69, 0x64, 0x59, 0x12, 0x29, 0x0a, 0x03, 0x64, 0x69, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x73, 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, 0x05, 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, 0xb8, 0x01, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, - 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 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, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x69, - 0x64, 0x65, 0x72, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x22, - 0x51, 0x0a, 0x11, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x65, 0x63, - 0x6f, 0x64, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x02, 0x64, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x02, 0x64, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x74, 0x6e, 0x41, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x62, 0x74, 0x6e, 0x41, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x22, 0x50, 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, 0x18, 0x0a, 0x07, 0x65, 0x6e, - 0x63, 0x6f, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x65, 0x6e, 0x63, - 0x6f, 0x64, 0x65, 0x64, 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, - 0x8b, 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, 0x40, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 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, 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, - 0x4c, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x6f, + 0x61, 0x74, 0x69, 0x6f, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x70, 0x41, 0x74, 0x6b, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x11, 0x73, 0x70, 0x41, 0x74, 0x6b, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, + 0x65, 0x73, 0x1a, 0x5d, 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, 0x2d, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x56, 0x65, 0x63, + 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x65, 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, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 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, 0xc7, 0x02, 0x0a, 0x0e, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x76, + 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x58, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x58, 0x12, + 0x22, 0x0a, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x59, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, + 0x69, 0x64, 0x59, 0x12, 0x29, 0x0a, 0x03, 0x64, 0x69, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 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, 0x05, 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, 0xb8, 0x01, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, + 0x6e, 0x73, 0x79, 0x6e, 0x63, 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, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, + 0x72, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x63, + 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x22, 0x51, 0x0a, + 0x11, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x65, 0x63, 0x6f, 0x64, + 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, + 0x64, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, + 0x64, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x74, 0x6e, 0x41, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x62, 0x74, 0x6e, 0x41, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x22, 0x50, 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, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, + 0x65, 0x64, 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, 0x8b, 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, 0x40, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 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, 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, 0x52, 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, - 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 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, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x1a, 0x5a, 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, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, - 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x4d, 0x65, - 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb8, 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, - 0x4e, 0x0a, 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, - 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x27, 0x0a, 0x02, 0x68, 0x62, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x55, 0x70, - 0x73, 0x79, 0x6e, 0x63, 0x52, 0x02, 0x68, 0x62, 0x22, 0x89, 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, 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, + 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, 0x4c, 0x0a, + 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2a, 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, 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, 0x52, 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, 0x2c, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 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, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, + 0x5a, 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, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x74, 0x61, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb8, 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, 0x4e, 0x0a, + 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, + 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, + 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, + 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x27, 0x0a, + 0x02, 0x68, 0x62, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x55, 0x70, 0x73, 0x79, + 0x6e, 0x63, 0x52, 0x02, 0x68, 0x62, 0x22, 0x89, 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, 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 ( diff --git a/battle_srv/ws/serve.go b/battle_srv/ws/serve.go index c45d3cd..9d5a921 100644 --- a/battle_srv/ws/serve.go +++ b/battle_srv/ws/serve.go @@ -247,8 +247,8 @@ func Serve(c *gin.Context) { bciFrame := &pb.BattleColliderInfo{ BoundRoomId: pRoom.Id, StageName: pRoom.StageName, - StrToVec2DListMap: pRoom.RawBattleStrToVec2DListMap, - StrToPolygon2DListMap: pRoom.RawBattleStrToPolygon2DListMap, + StrToVec2DListMap: pRoom.StrToVec2DListMap, + StrToPolygon2DListMap: pRoom.StrToPolygon2DListMap, StageDiscreteW: pRoom.StageDiscreteW, StageDiscreteH: pRoom.StageDiscreteH, StageTileW: pRoom.StageTileW, @@ -269,6 +269,8 @@ func Serve(c *gin.Context) { WorldToVirtualGridRatio: pRoom.WorldToVirtualGridRatio, VirtualGridToWorldRatio: pRoom.VirtualGridToWorldRatio, + + SpAtkLookupFrames: pRoom.SpAtkLookupFrames, } resp := &pb.WsResp{ diff --git a/dnmshared/sharedprotos/geometry.pb.go b/dnmshared/sharedprotos/geometry.pb.go index b96f64b..e3aedc9 100644 --- a/dnmshared/sharedprotos/geometry.pb.go +++ b/dnmshared/sharedprotos/geometry.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.4 +// protoc v3.7.1 // source: geometry.proto package sharedprotos diff --git a/frontend/assets/resources/pbfiles/room_downsync_frame.proto b/frontend/assets/resources/pbfiles/room_downsync_frame.proto index ecabe52..ad3960f 100644 --- a/frontend/assets/resources/pbfiles/room_downsync_frame.proto +++ b/frontend/assets/resources/pbfiles/room_downsync_frame.proto @@ -29,6 +29,8 @@ message BattleColliderInfo { double worldToVirtualGridRatio = 21; double virtualGridToWorldRatio = 22; + + int32 spAtkLookupFrames = 23; } message PlayerDownsync { diff --git a/frontend/assets/scenes/login.fire b/frontend/assets/scenes/login.fire index 76a6bfa..2b9da7c 100644 --- a/frontend/assets/scenes/login.fire +++ b/frontend/assets/scenes/login.fire @@ -440,7 +440,7 @@ "array": [ 0, 0, - 216.50635094610968, + 344.6705889248102, 0, 0, 0, diff --git a/frontend/assets/scripts/AttackingCharacter.js b/frontend/assets/scripts/AttackingCharacter.js index 6340bdf..df5fefc 100644 --- a/frontend/assets/scripts/AttackingCharacter.js +++ b/frontend/assets/scripts/AttackingCharacter.js @@ -38,6 +38,7 @@ cc.Class({ }, scheduleNewDirection(newScheduledDirection, forceAnimSwitch) { + const oldDx = this.activeDirection.dx, oldDy = this.activeDirection.dy; BaseCharacter.prototype.scheduleNewDirection.call(this, newScheduledDirection, forceAnimSwitch); if (ATK_CHARACTER_STATE.Atk1[0] == this.characterState) { return; @@ -53,6 +54,7 @@ cc.Class({ const newAnimName = window.ATK_CHARACTER_STATE_ARR[newCharacterState][1]; if (newAnimName != this.animComp.animationName) { this.animComp.playAnimation(newAnimName); + // console.log(`JoinIndex=${this.joinIndex}, Resetting anim to ${newAnimName}, dir changed: (${oldDx}, ${oldDy}) -> (${newScheduledDirection.dx}, ${newScheduledDirection.dy})`); } } }, diff --git a/frontend/assets/scripts/Map.js b/frontend/assets/scripts/Map.js index 4f7f070..5bb3452 100644 --- a/frontend/assets/scripts/Map.js +++ b/frontend/assets/scripts/Map.js @@ -113,7 +113,7 @@ cc.Class({ dumpToInputCache: function(inputFrameDownsync) { const self = this; - let minToKeepInputFrameId = self._convertToInputFrameId(self.lastAllConfirmedRenderFrameId, self.inputDelayFrames); // [WARNING] This could be different from "self.lastAllConfirmedInputFrameId". We'd like to keep the corresponding delayedInputFrame for "self.lastAllConfirmedRenderFrameId" such that a rollback could place "self.chaserRenderFrameId = self.lastAllConfirmedRenderFrameId" for the worst case incorrect prediction. + let minToKeepInputFrameId = self._convertToInputFrameId(self.lastAllConfirmedRenderFrameId, self.inputDelayFrames) - self.spAtkLookupFrames; // [WARNING] This could be different from "self.lastAllConfirmedInputFrameId". We'd like to keep the corresponding delayedInputFrame for "self.lastAllConfirmedRenderFrameId" such that a rollback could place "self.chaserRenderFrameId = self.lastAllConfirmedRenderFrameId" for the worst case incorrect prediction. if (minToKeepInputFrameId > self.lastAllConfirmedInputFrameId) { minToKeepInputFrameId = self.lastAllConfirmedInputFrameId; } @@ -209,6 +209,8 @@ cc.Class({ inputFrameUpsyncBatch.push(inputFrameUpsync); } } + + // console.info(`inputFrameUpsyncBatch: ${JSON.stringify(inputFrameUpsyncBatch)}`); const reqData = window.pb.protos.WsReq.encode({ msgId: Date.now(), playerId: self.selfPlayerInfo.id, @@ -374,7 +376,8 @@ cc.Class({ window.clearBoundRoomIdInBothVolatileAndPersistentStorage(); window.initPersistentSessionClient(self.initAfterWSConnected, null /* Deliberately NOT passing in any `expectedRoomId`. -- YFLu */ ); }; - resultPanelScriptIns.onCloseDelegate = () => {}; + resultPanelScriptIns.onCloseDelegate = () => { + }; self.gameRuleNode = cc.instantiate(self.gameRulePrefab); self.gameRuleNode.width = self.canvasNode.width; @@ -415,6 +418,7 @@ cc.Class({ self.rollbackEstimatedDtMillis = parsedBattleColliderInfo.rollbackEstimatedDtMillis; self.rollbackEstimatedDtNanos = parsedBattleColliderInfo.rollbackEstimatedDtNanos; self.maxChasingRenderFramesPerUpdate = parsedBattleColliderInfo.maxChasingRenderFramesPerUpdate; + self.spAtkLookupFrames = parsedBattleColliderInfo.spAtkLookupFrames; self.worldToVirtualGridRatio = parsedBattleColliderInfo.worldToVirtualGridRatio; self.virtualGridToWorldRatio = parsedBattleColliderInfo.virtualGridToWorldRatio; @@ -754,6 +758,7 @@ cc.Class({ const self = this; const newPlayerNode = cc.instantiate(self.controlledCharacterPrefab) const playerScriptIns = newPlayerNode.getComponent("ControlledCharacter"); + playerScriptIns.joinIndex = joinIndex; if (1 == joinIndex) { playerScriptIns.setSpecies("SoldierElf"); diff --git a/frontend/assets/scripts/TouchEventsManager.js b/frontend/assets/scripts/TouchEventsManager.js index 4982f64..13b9c69 100644 --- a/frontend/assets/scripts/TouchEventsManager.js +++ b/frontend/assets/scripts/TouchEventsManager.js @@ -404,7 +404,7 @@ cc.Class({ }, decodeInput(encodedInput) { - const encodedDirection = (encodedInput & 0xf); + const encodedDirection = (encodedInput & 15); const mappedDirection = window.DIRECTION_DECODER[encodedDirection]; if (null == mappedDirection) { console.error("Unexpected encodedDirection = ", encodedDirection); 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 83e8504..71c7970 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 @@ -83,9 +83,9 @@ $root.sharedprotos = (function() { Direction.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dx != null && Object.hasOwnProperty.call(message, "dx")) + if (message.dx != null && message.hasOwnProperty("dx")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dx); - if (message.dy != null && Object.hasOwnProperty.call(message, "dy")) + if (message.dy != null && message.hasOwnProperty("dy")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dy); return writer; }; @@ -121,14 +121,12 @@ $root.sharedprotos = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.dx = reader.int32(); - break; - } - case 2: { - message.dy = reader.int32(); - break; - } + case 1: + message.dx = reader.int32(); + break; + case 2: + message.dy = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -227,21 +225,6 @@ $root.sharedprotos = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for Direction - * @function getTypeUrl - * @memberof sharedprotos.Direction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Direction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/sharedprotos.Direction"; - }; - return Direction; })(); @@ -310,9 +293,9 @@ $root.sharedprotos = (function() { Vec2D.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.x != null && Object.hasOwnProperty.call(message, "x")) + if (message.x != null && message.hasOwnProperty("x")) writer.uint32(/* id 1, wireType 1 =*/9).double(message.x); - if (message.y != null && Object.hasOwnProperty.call(message, "y")) + if (message.y != null && message.hasOwnProperty("y")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.y); return writer; }; @@ -348,14 +331,12 @@ $root.sharedprotos = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.x = reader.double(); - break; - } - case 2: { - message.y = reader.double(); - break; - } + case 1: + message.x = reader.double(); + break; + case 2: + message.y = reader.double(); + break; default: reader.skipType(tag & 7); break; @@ -454,21 +435,6 @@ $root.sharedprotos = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for Vec2D - * @function getTypeUrl - * @memberof sharedprotos.Vec2D - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Vec2D.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/sharedprotos.Vec2D"; - }; - return Vec2D; })(); @@ -538,7 +504,7 @@ $root.sharedprotos = (function() { Polygon2D.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.anchor != null && Object.hasOwnProperty.call(message, "anchor")) + if (message.anchor != null && message.hasOwnProperty("anchor")) $root.sharedprotos.Vec2D.encode(message.anchor, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.points != null && message.points.length) for (var i = 0; i < message.points.length; ++i) @@ -577,16 +543,14 @@ $root.sharedprotos = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.anchor = $root.sharedprotos.Vec2D.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.points && message.points.length)) - message.points = []; - message.points.push($root.sharedprotos.Vec2D.decode(reader, reader.uint32())); - break; - } + case 1: + message.anchor = $root.sharedprotos.Vec2D.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.points && message.points.length)) + message.points = []; + message.points.push($root.sharedprotos.Vec2D.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -707,21 +671,6 @@ $root.sharedprotos = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for Polygon2D - * @function getTypeUrl - * @memberof sharedprotos.Polygon2D - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Polygon2D.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/sharedprotos.Polygon2D"; - }; - return Polygon2D; })(); @@ -819,12 +768,11 @@ $root.sharedprotos = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - if (!(message.eles && message.eles.length)) - message.eles = []; - message.eles.push($root.sharedprotos.Vec2D.decode(reader, reader.uint32())); - break; - } + case 1: + if (!(message.eles && message.eles.length)) + message.eles = []; + message.eles.push($root.sharedprotos.Vec2D.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -931,21 +879,6 @@ $root.sharedprotos = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for Vec2DList - * @function getTypeUrl - * @memberof sharedprotos.Vec2DList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Vec2DList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/sharedprotos.Vec2DList"; - }; - return Vec2DList; })(); @@ -1043,12 +976,11 @@ $root.sharedprotos = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - if (!(message.eles && message.eles.length)) - message.eles = []; - message.eles.push($root.sharedprotos.Polygon2D.decode(reader, reader.uint32())); - break; - } + case 1: + if (!(message.eles && message.eles.length)) + message.eles = []; + message.eles.push($root.sharedprotos.Polygon2D.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -1155,21 +1087,6 @@ $root.sharedprotos = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for Polygon2DList - * @function getTypeUrl - * @memberof sharedprotos.Polygon2DList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Polygon2DList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/sharedprotos.Polygon2DList"; - }; - return Polygon2DList; })(); @@ -1213,6 +1130,7 @@ $root.protos = (function() { * @property {number|Long|null} [rollbackEstimatedDtNanos] BattleColliderInfo rollbackEstimatedDtNanos * @property {number|null} [worldToVirtualGridRatio] BattleColliderInfo worldToVirtualGridRatio * @property {number|null} [virtualGridToWorldRatio] BattleColliderInfo virtualGridToWorldRatio + * @property {number|null} [spAtkLookupFrames] BattleColliderInfo spAtkLookupFrames */ /** @@ -1408,6 +1326,14 @@ $root.protos = (function() { */ BattleColliderInfo.prototype.virtualGridToWorldRatio = 0; + /** + * BattleColliderInfo spAtkLookupFrames. + * @member {number} spAtkLookupFrames + * @memberof protos.BattleColliderInfo + * @instance + */ + BattleColliderInfo.prototype.spAtkLookupFrames = 0; + /** * Creates a new BattleColliderInfo instance using the specified properties. * @function create @@ -1432,56 +1358,58 @@ $root.protos = (function() { BattleColliderInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.stageName != null && Object.hasOwnProperty.call(message, "stageName")) + if (message.stageName != null && message.hasOwnProperty("stageName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.stageName); - if (message.strToVec2DListMap != null && Object.hasOwnProperty.call(message, "strToVec2DListMap")) + if (message.strToVec2DListMap != null && message.hasOwnProperty("strToVec2DListMap")) for (var keys = Object.keys(message.strToVec2DListMap), i = 0; i < keys.length; ++i) { writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); $root.sharedprotos.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")) + if (message.strToPolygon2DListMap != null && message.hasOwnProperty("strToPolygon2DListMap")) for (var keys = Object.keys(message.strToPolygon2DListMap), i = 0; i < keys.length; ++i) { writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); $root.sharedprotos.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")) + if (message.stageDiscreteW != null && message.hasOwnProperty("stageDiscreteW")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.stageDiscreteW); - if (message.stageDiscreteH != null && Object.hasOwnProperty.call(message, "stageDiscreteH")) + if (message.stageDiscreteH != null && message.hasOwnProperty("stageDiscreteH")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.stageDiscreteH); - if (message.stageTileW != null && Object.hasOwnProperty.call(message, "stageTileW")) + if (message.stageTileW != null && message.hasOwnProperty("stageTileW")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.stageTileW); - if (message.stageTileH != null && Object.hasOwnProperty.call(message, "stageTileH")) + if (message.stageTileH != null && message.hasOwnProperty("stageTileH")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.stageTileH); - if (message.intervalToPing != null && Object.hasOwnProperty.call(message, "intervalToPing")) + if (message.intervalToPing != null && message.hasOwnProperty("intervalToPing")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.intervalToPing); - if (message.willKickIfInactiveFor != null && Object.hasOwnProperty.call(message, "willKickIfInactiveFor")) + if (message.willKickIfInactiveFor != null && message.hasOwnProperty("willKickIfInactiveFor")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.willKickIfInactiveFor); - if (message.boundRoomId != null && Object.hasOwnProperty.call(message, "boundRoomId")) + if (message.boundRoomId != null && message.hasOwnProperty("boundRoomId")) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.boundRoomId); - if (message.battleDurationNanos != null && Object.hasOwnProperty.call(message, "battleDurationNanos")) + if (message.battleDurationNanos != null && message.hasOwnProperty("battleDurationNanos")) writer.uint32(/* id 11, wireType 0 =*/88).int64(message.battleDurationNanos); - if (message.serverFps != null && Object.hasOwnProperty.call(message, "serverFps")) + if (message.serverFps != null && message.hasOwnProperty("serverFps")) writer.uint32(/* id 12, wireType 0 =*/96).int32(message.serverFps); - if (message.inputDelayFrames != null && Object.hasOwnProperty.call(message, "inputDelayFrames")) + if (message.inputDelayFrames != null && message.hasOwnProperty("inputDelayFrames")) writer.uint32(/* id 13, wireType 0 =*/104).int32(message.inputDelayFrames); - if (message.inputScaleFrames != null && Object.hasOwnProperty.call(message, "inputScaleFrames")) + if (message.inputScaleFrames != null && message.hasOwnProperty("inputScaleFrames")) writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.inputScaleFrames); - if (message.nstDelayFrames != null && Object.hasOwnProperty.call(message, "nstDelayFrames")) + if (message.nstDelayFrames != null && message.hasOwnProperty("nstDelayFrames")) writer.uint32(/* id 15, wireType 0 =*/120).int32(message.nstDelayFrames); - if (message.inputFrameUpsyncDelayTolerance != null && Object.hasOwnProperty.call(message, "inputFrameUpsyncDelayTolerance")) + if (message.inputFrameUpsyncDelayTolerance != null && message.hasOwnProperty("inputFrameUpsyncDelayTolerance")) writer.uint32(/* id 16, wireType 0 =*/128).int32(message.inputFrameUpsyncDelayTolerance); - if (message.maxChasingRenderFramesPerUpdate != null && Object.hasOwnProperty.call(message, "maxChasingRenderFramesPerUpdate")) + if (message.maxChasingRenderFramesPerUpdate != null && message.hasOwnProperty("maxChasingRenderFramesPerUpdate")) writer.uint32(/* id 17, wireType 0 =*/136).int32(message.maxChasingRenderFramesPerUpdate); - if (message.playerBattleState != null && Object.hasOwnProperty.call(message, "playerBattleState")) + if (message.playerBattleState != null && message.hasOwnProperty("playerBattleState")) writer.uint32(/* id 18, wireType 0 =*/144).int32(message.playerBattleState); - if (message.rollbackEstimatedDtMillis != null && Object.hasOwnProperty.call(message, "rollbackEstimatedDtMillis")) + if (message.rollbackEstimatedDtMillis != null && message.hasOwnProperty("rollbackEstimatedDtMillis")) writer.uint32(/* id 19, wireType 1 =*/153).double(message.rollbackEstimatedDtMillis); - if (message.rollbackEstimatedDtNanos != null && Object.hasOwnProperty.call(message, "rollbackEstimatedDtNanos")) + if (message.rollbackEstimatedDtNanos != null && message.hasOwnProperty("rollbackEstimatedDtNanos")) writer.uint32(/* id 20, wireType 0 =*/160).int64(message.rollbackEstimatedDtNanos); - if (message.worldToVirtualGridRatio != null && Object.hasOwnProperty.call(message, "worldToVirtualGridRatio")) + if (message.worldToVirtualGridRatio != null && message.hasOwnProperty("worldToVirtualGridRatio")) writer.uint32(/* id 21, wireType 1 =*/169).double(message.worldToVirtualGridRatio); - if (message.virtualGridToWorldRatio != null && Object.hasOwnProperty.call(message, "virtualGridToWorldRatio")) + if (message.virtualGridToWorldRatio != null && message.hasOwnProperty("virtualGridToWorldRatio")) writer.uint32(/* id 22, wireType 1 =*/177).double(message.virtualGridToWorldRatio); + if (message.spAtkLookupFrames != null && message.hasOwnProperty("spAtkLookupFrames")) + writer.uint32(/* id 23, wireType 0 =*/184).int32(message.spAtkLookupFrames); return writer; }; @@ -1512,136 +1440,89 @@ $root.protos = (function() { 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(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protos.BattleColliderInfo(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.stageName = reader.string(); - break; - } - case 2: { - if (message.strToVec2DListMap === $util.emptyObject) - message.strToVec2DListMap = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.sharedprotos.Vec2DList.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.strToVec2DListMap[key] = value; - break; - } - case 3: { - if (message.strToPolygon2DListMap === $util.emptyObject) - message.strToPolygon2DListMap = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.sharedprotos.Polygon2DList.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - 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.stageTileH = reader.int32(); - break; - } - case 8: { - message.intervalToPing = reader.int32(); - break; - } - case 9: { - message.willKickIfInactiveFor = reader.int32(); - break; - } - case 10: { - 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; - } - case 18: { - message.playerBattleState = reader.int32(); - break; - } - case 19: { - message.rollbackEstimatedDtMillis = reader.double(); - break; - } - case 20: { - message.rollbackEstimatedDtNanos = reader.int64(); - break; - } - case 21: { - message.worldToVirtualGridRatio = reader.double(); - break; - } - case 22: { - message.virtualGridToWorldRatio = reader.double(); - break; - } + case 1: + message.stageName = reader.string(); + break; + case 2: + reader.skip().pos++; + if (message.strToVec2DListMap === $util.emptyObject) + message.strToVec2DListMap = {}; + key = reader.string(); + reader.pos++; + message.strToVec2DListMap[key] = $root.sharedprotos.Vec2DList.decode(reader, reader.uint32()); + break; + case 3: + reader.skip().pos++; + if (message.strToPolygon2DListMap === $util.emptyObject) + message.strToPolygon2DListMap = {}; + key = reader.string(); + reader.pos++; + message.strToPolygon2DListMap[key] = $root.sharedprotos.Polygon2DList.decode(reader, reader.uint32()); + 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.stageTileH = reader.int32(); + break; + case 8: + message.intervalToPing = reader.int32(); + break; + case 9: + message.willKickIfInactiveFor = reader.int32(); + break; + case 10: + 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; + case 18: + message.playerBattleState = reader.int32(); + break; + case 19: + message.rollbackEstimatedDtMillis = reader.double(); + break; + case 20: + message.rollbackEstimatedDtNanos = reader.int64(); + break; + case 21: + message.worldToVirtualGridRatio = reader.double(); + break; + case 22: + message.virtualGridToWorldRatio = reader.double(); + break; + case 23: + message.spAtkLookupFrames = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -1757,6 +1638,9 @@ $root.protos = (function() { if (message.virtualGridToWorldRatio != null && message.hasOwnProperty("virtualGridToWorldRatio")) if (typeof message.virtualGridToWorldRatio !== "number") return "virtualGridToWorldRatio: number expected"; + if (message.spAtkLookupFrames != null && message.hasOwnProperty("spAtkLookupFrames")) + if (!$util.isInteger(message.spAtkLookupFrames)) + return "spAtkLookupFrames: integer expected"; return null; }; @@ -1846,6 +1730,8 @@ $root.protos = (function() { message.worldToVirtualGridRatio = Number(object.worldToVirtualGridRatio); if (object.virtualGridToWorldRatio != null) message.virtualGridToWorldRatio = Number(object.virtualGridToWorldRatio); + if (object.spAtkLookupFrames != null) + message.spAtkLookupFrames = object.spAtkLookupFrames | 0; return message; }; @@ -1895,6 +1781,7 @@ $root.protos = (function() { object.rollbackEstimatedDtNanos = options.longs === String ? "0" : 0; object.worldToVirtualGridRatio = 0; object.virtualGridToWorldRatio = 0; + object.spAtkLookupFrames = 0; } if (message.stageName != null && message.hasOwnProperty("stageName")) object.stageName = message.stageName; @@ -1953,6 +1840,8 @@ $root.protos = (function() { object.worldToVirtualGridRatio = options.json && !isFinite(message.worldToVirtualGridRatio) ? String(message.worldToVirtualGridRatio) : message.worldToVirtualGridRatio; if (message.virtualGridToWorldRatio != null && message.hasOwnProperty("virtualGridToWorldRatio")) object.virtualGridToWorldRatio = options.json && !isFinite(message.virtualGridToWorldRatio) ? String(message.virtualGridToWorldRatio) : message.virtualGridToWorldRatio; + if (message.spAtkLookupFrames != null && message.hasOwnProperty("spAtkLookupFrames")) + object.spAtkLookupFrames = message.spAtkLookupFrames; return object; }; @@ -1967,21 +1856,6 @@ $root.protos = (function() { 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; })(); @@ -2122,25 +1996,25 @@ $root.protos = (function() { PlayerDownsync.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) + if (message.id != null && message.hasOwnProperty("id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); - if (message.virtualGridX != null && Object.hasOwnProperty.call(message, "virtualGridX")) + if (message.virtualGridX != null && message.hasOwnProperty("virtualGridX")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.virtualGridX); - if (message.virtualGridY != null && Object.hasOwnProperty.call(message, "virtualGridY")) + if (message.virtualGridY != null && message.hasOwnProperty("virtualGridY")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.virtualGridY); - if (message.dir != null && Object.hasOwnProperty.call(message, "dir")) + if (message.dir != null && message.hasOwnProperty("dir")) $root.sharedprotos.Direction.encode(message.dir, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.speed != null && Object.hasOwnProperty.call(message, "speed")) + if (message.speed != null && message.hasOwnProperty("speed")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.speed); - if (message.battleState != null && Object.hasOwnProperty.call(message, "battleState")) + if (message.battleState != null && message.hasOwnProperty("battleState")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.battleState); - if (message.lastMoveGmtMillis != null && Object.hasOwnProperty.call(message, "lastMoveGmtMillis")) + if (message.lastMoveGmtMillis != null && message.hasOwnProperty("lastMoveGmtMillis")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.lastMoveGmtMillis); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) + if (message.score != null && message.hasOwnProperty("score")) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.score); - if (message.removed != null && Object.hasOwnProperty.call(message, "removed")) + if (message.removed != null && message.hasOwnProperty("removed")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.removed); - if (message.joinIndex != null && Object.hasOwnProperty.call(message, "joinIndex")) + if (message.joinIndex != null && message.hasOwnProperty("joinIndex")) writer.uint32(/* id 12, wireType 0 =*/96).int32(message.joinIndex); return writer; }; @@ -2176,46 +2050,36 @@ $root.protos = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.id = reader.int32(); - break; - } - case 2: { - message.virtualGridX = reader.int32(); - break; - } - case 3: { - message.virtualGridY = reader.int32(); - break; - } - case 4: { - message.dir = $root.sharedprotos.Direction.decode(reader, reader.uint32()); - break; - } - case 5: { - message.speed = reader.int32(); - break; - } - case 6: { - message.battleState = reader.int32(); - break; - } - case 7: { - message.lastMoveGmtMillis = reader.int32(); - break; - } - case 10: { - message.score = reader.int32(); - break; - } - case 11: { - message.removed = reader.bool(); - break; - } - case 12: { - message.joinIndex = reader.int32(); - break; - } + case 1: + message.id = reader.int32(); + break; + case 2: + message.virtualGridX = reader.int32(); + break; + case 3: + message.virtualGridY = reader.int32(); + break; + case 4: + message.dir = $root.sharedprotos.Direction.decode(reader, reader.uint32()); + break; + case 5: + message.speed = reader.int32(); + break; + case 6: + message.battleState = reader.int32(); + break; + case 7: + message.lastMoveGmtMillis = reader.int32(); + break; + case 10: + message.score = reader.int32(); + break; + case 11: + message.removed = reader.bool(); + break; + case 12: + message.joinIndex = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -2383,21 +2247,6 @@ $root.protos = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for PlayerDownsync - * @function getTypeUrl - * @memberof protos.PlayerDownsync - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PlayerDownsync.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/protos.PlayerDownsync"; - }; - return PlayerDownsync; })(); @@ -2502,17 +2351,17 @@ $root.protos = (function() { PlayerDownsyncMeta.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) + if (message.id != null && message.hasOwnProperty("id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.avatar != null && Object.hasOwnProperty.call(message, "avatar")) + if (message.avatar != null && message.hasOwnProperty("avatar")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.avatar); - if (message.joinIndex != null && Object.hasOwnProperty.call(message, "joinIndex")) + if (message.joinIndex != null && message.hasOwnProperty("joinIndex")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.joinIndex); - if (message.colliderRadius != null && Object.hasOwnProperty.call(message, "colliderRadius")) + if (message.colliderRadius != null && message.hasOwnProperty("colliderRadius")) writer.uint32(/* id 6, wireType 1 =*/49).double(message.colliderRadius); return writer; }; @@ -2548,30 +2397,24 @@ $root.protos = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.id = reader.int32(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - message.displayName = reader.string(); - break; - } - case 4: { - message.avatar = reader.string(); - break; - } - case 5: { - message.joinIndex = reader.int32(); - break; - } - case 6: { - message.colliderRadius = reader.double(); - break; - } + case 1: + message.id = reader.int32(); + break; + case 2: + message.name = reader.string(); + break; + case 3: + message.displayName = reader.string(); + break; + case 4: + message.avatar = reader.string(); + break; + case 5: + message.joinIndex = reader.int32(); + break; + case 6: + message.colliderRadius = reader.double(); + break; default: reader.skipType(tag & 7); break; @@ -2702,21 +2545,6 @@ $root.protos = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for PlayerDownsyncMeta - * @function getTypeUrl - * @memberof protos.PlayerDownsyncMeta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PlayerDownsyncMeta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/protos.PlayerDownsyncMeta"; - }; - return PlayerDownsyncMeta; })(); @@ -2794,11 +2622,11 @@ $root.protos = (function() { InputFrameDecoded.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dx != null && Object.hasOwnProperty.call(message, "dx")) + if (message.dx != null && message.hasOwnProperty("dx")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dx); - if (message.dy != null && Object.hasOwnProperty.call(message, "dy")) + if (message.dy != null && message.hasOwnProperty("dy")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dy); - if (message.btnALevel != null && Object.hasOwnProperty.call(message, "btnALevel")) + if (message.btnALevel != null && message.hasOwnProperty("btnALevel")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.btnALevel); return writer; }; @@ -2834,18 +2662,15 @@ $root.protos = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.dx = reader.int32(); - break; - } - case 2: { - message.dy = reader.int32(); - break; - } - case 3: { - message.btnALevel = reader.int32(); - break; - } + case 1: + message.dx = reader.int32(); + break; + case 2: + message.dy = reader.int32(); + break; + case 3: + message.btnALevel = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -2952,21 +2777,6 @@ $root.protos = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for InputFrameDecoded - * @function getTypeUrl - * @memberof protos.InputFrameDecoded - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InputFrameDecoded.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/protos.InputFrameDecoded"; - }; - return InputFrameDecoded; })(); @@ -3035,9 +2845,9 @@ $root.protos = (function() { InputFrameUpsync.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inputFrameId != null && Object.hasOwnProperty.call(message, "inputFrameId")) + if (message.inputFrameId != null && message.hasOwnProperty("inputFrameId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.inputFrameId); - if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded")) + if (message.encoded != null && message.hasOwnProperty("encoded")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.encoded); return writer; }; @@ -3073,14 +2883,12 @@ $root.protos = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.inputFrameId = reader.int32(); - break; - } - case 2: { - message.encoded = reader.uint64(); - break; - } + case 1: + message.inputFrameId = reader.int32(); + break; + case 2: + message.encoded = reader.uint64(); + break; default: reader.skipType(tag & 7); break; @@ -3193,21 +3001,6 @@ $root.protos = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for InputFrameUpsync - * @function getTypeUrl - * @memberof protos.InputFrameUpsync - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InputFrameUpsync.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/protos.InputFrameUpsync"; - }; - return InputFrameUpsync; })(); @@ -3286,7 +3079,7 @@ $root.protos = (function() { InputFrameDownsync.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inputFrameId != null && Object.hasOwnProperty.call(message, "inputFrameId")) + if (message.inputFrameId != null && message.hasOwnProperty("inputFrameId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.inputFrameId); if (message.inputList != null && message.inputList.length) { writer.uint32(/* id 2, wireType 2 =*/18).fork(); @@ -3294,7 +3087,7 @@ $root.protos = (function() { writer.uint64(message.inputList[i]); writer.ldelim(); } - if (message.confirmedList != null && Object.hasOwnProperty.call(message, "confirmedList")) + if (message.confirmedList != null && message.hasOwnProperty("confirmedList")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.confirmedList); return writer; }; @@ -3330,25 +3123,22 @@ $root.protos = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.inputFrameId = reader.int32(); - break; - } - case 2: { - if (!(message.inputList && message.inputList.length)) - message.inputList = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.inputList.push(reader.uint64()); - } else + case 1: + message.inputFrameId = reader.int32(); + break; + case 2: + if (!(message.inputList && message.inputList.length)) + message.inputList = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) message.inputList.push(reader.uint64()); - break; - } - case 3: { - message.confirmedList = reader.uint64(); - break; - } + } else + message.inputList.push(reader.uint64()); + break; + case 3: + message.confirmedList = reader.uint64(); + break; default: reader.skipType(tag & 7); break; @@ -3492,21 +3282,6 @@ $root.protos = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for InputFrameDownsync - * @function getTypeUrl - * @memberof protos.InputFrameDownsync - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InputFrameDownsync.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/protos.InputFrameDownsync"; - }; - return InputFrameDownsync; })(); @@ -3566,7 +3341,7 @@ $root.protos = (function() { HeartbeatUpsync.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.clientTimestamp != null && Object.hasOwnProperty.call(message, "clientTimestamp")) + if (message.clientTimestamp != null && message.hasOwnProperty("clientTimestamp")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.clientTimestamp); return writer; }; @@ -3602,10 +3377,9 @@ $root.protos = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.clientTimestamp = reader.int64(); - break; - } + case 1: + message.clientTimestamp = reader.int64(); + break; default: reader.skipType(tag & 7); break; @@ -3709,21 +3483,6 @@ $root.protos = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for HeartbeatUpsync - * @function getTypeUrl - * @memberof protos.HeartbeatUpsync - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HeartbeatUpsync.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/protos.HeartbeatUpsync"; - }; - return HeartbeatUpsync; })(); @@ -3812,16 +3571,16 @@ $root.protos = (function() { RoomDownsyncFrame.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) + if (message.id != null && message.hasOwnProperty("id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); - if (message.players != null && Object.hasOwnProperty.call(message, "players")) + if (message.players != null && message.hasOwnProperty("players")) for (var keys = Object.keys(message.players), i = 0; i < keys.length; ++i) { writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); $root.protos.PlayerDownsync.encode(message.players[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } - if (message.countdownNanos != null && Object.hasOwnProperty.call(message, "countdownNanos")) + if (message.countdownNanos != null && message.hasOwnProperty("countdownNanos")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.countdownNanos); - if (message.playerMetas != null && Object.hasOwnProperty.call(message, "playerMetas")) + if (message.playerMetas != null && message.hasOwnProperty("playerMetas")) for (var keys = Object.keys(message.playerMetas), i = 0; i < keys.length; ++i) { writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]); $root.protos.PlayerDownsyncMeta.encode(message.playerMetas[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); @@ -3856,64 +3615,32 @@ $root.protos = (function() { RoomDownsyncFrame.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.RoomDownsyncFrame(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protos.RoomDownsyncFrame(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.id = reader.int32(); - break; - } - case 2: { - if (message.players === $util.emptyObject) - message.players = {}; - var end2 = reader.uint32() + reader.pos; - key = 0; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.int32(); - break; - case 2: - value = $root.protos.PlayerDownsync.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.players[key] = value; - break; - } - case 3: { - message.countdownNanos = reader.int64(); - break; - } - case 4: { - if (message.playerMetas === $util.emptyObject) - message.playerMetas = {}; - var end2 = reader.uint32() + reader.pos; - key = 0; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.int32(); - break; - case 2: - value = $root.protos.PlayerDownsyncMeta.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.playerMetas[key] = value; - break; - } + case 1: + message.id = reader.int32(); + break; + case 2: + reader.skip().pos++; + if (message.players === $util.emptyObject) + message.players = {}; + key = reader.int32(); + reader.pos++; + message.players[key] = $root.protos.PlayerDownsync.decode(reader, reader.uint32()); + break; + case 3: + message.countdownNanos = reader.int64(); + break; + case 4: + reader.skip().pos++; + if (message.playerMetas === $util.emptyObject) + message.playerMetas = {}; + key = reader.int32(); + reader.pos++; + message.playerMetas[key] = $root.protos.PlayerDownsyncMeta.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -4089,21 +3816,6 @@ $root.protos = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for RoomDownsyncFrame - * @function getTypeUrl - * @memberof protos.RoomDownsyncFrame - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RoomDownsyncFrame.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/protos.RoomDownsyncFrame"; - }; - return RoomDownsyncFrame; })(); @@ -4227,22 +3939,22 @@ $root.protos = (function() { WsReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.msgId != null && Object.hasOwnProperty.call(message, "msgId")) + if (message.msgId != null && message.hasOwnProperty("msgId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.msgId); - if (message.playerId != null && Object.hasOwnProperty.call(message, "playerId")) + if (message.playerId != null && message.hasOwnProperty("playerId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.playerId); - if (message.act != null && Object.hasOwnProperty.call(message, "act")) + if (message.act != null && message.hasOwnProperty("act")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.act); - if (message.joinIndex != null && Object.hasOwnProperty.call(message, "joinIndex")) + if (message.joinIndex != null && message.hasOwnProperty("joinIndex")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.joinIndex); - if (message.ackingFrameId != null && Object.hasOwnProperty.call(message, "ackingFrameId")) + if (message.ackingFrameId != null && message.hasOwnProperty("ackingFrameId")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.ackingFrameId); - if (message.ackingInputFrameId != null && Object.hasOwnProperty.call(message, "ackingInputFrameId")) + if (message.ackingInputFrameId != null && message.hasOwnProperty("ackingInputFrameId")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.ackingInputFrameId); if (message.inputFrameUpsyncBatch != null && message.inputFrameUpsyncBatch.length) for (var i = 0; i < message.inputFrameUpsyncBatch.length; ++i) $root.protos.InputFrameUpsync.encode(message.inputFrameUpsyncBatch[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.hb != null && Object.hasOwnProperty.call(message, "hb")) + if (message.hb != null && message.hasOwnProperty("hb")) $root.protos.HeartbeatUpsync.encode(message.hb, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -4278,40 +3990,32 @@ $root.protos = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.msgId = reader.int32(); - break; - } - case 2: { - message.playerId = reader.int32(); - break; - } - case 3: { - message.act = reader.int32(); - break; - } - case 4: { - message.joinIndex = reader.int32(); - break; - } - case 5: { - message.ackingFrameId = reader.int32(); - break; - } - case 6: { - message.ackingInputFrameId = reader.int32(); - break; - } - case 7: { - if (!(message.inputFrameUpsyncBatch && message.inputFrameUpsyncBatch.length)) - message.inputFrameUpsyncBatch = []; - message.inputFrameUpsyncBatch.push($root.protos.InputFrameUpsync.decode(reader, reader.uint32())); - break; - } - case 8: { - message.hb = $root.protos.HeartbeatUpsync.decode(reader, reader.uint32()); - break; - } + case 1: + message.msgId = reader.int32(); + break; + case 2: + message.playerId = reader.int32(); + break; + case 3: + message.act = reader.int32(); + break; + case 4: + message.joinIndex = reader.int32(); + break; + case 5: + message.ackingFrameId = reader.int32(); + break; + case 6: + message.ackingInputFrameId = reader.int32(); + break; + case 7: + if (!(message.inputFrameUpsyncBatch && message.inputFrameUpsyncBatch.length)) + message.inputFrameUpsyncBatch = []; + message.inputFrameUpsyncBatch.push($root.protos.InputFrameUpsync.decode(reader, reader.uint32())); + break; + case 8: + message.hb = $root.protos.HeartbeatUpsync.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -4481,21 +4185,6 @@ $root.protos = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for WsReq - * @function getTypeUrl - * @memberof protos.WsReq - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WsReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/protos.WsReq"; - }; - return WsReq; })(); @@ -4601,18 +4290,18 @@ $root.protos = (function() { WsResp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.ret != null && Object.hasOwnProperty.call(message, "ret")) + if (message.ret != null && message.hasOwnProperty("ret")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ret); - if (message.echoedMsgId != null && Object.hasOwnProperty.call(message, "echoedMsgId")) + if (message.echoedMsgId != null && message.hasOwnProperty("echoedMsgId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.echoedMsgId); - if (message.act != null && Object.hasOwnProperty.call(message, "act")) + if (message.act != null && message.hasOwnProperty("act")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.act); - if (message.rdf != null && Object.hasOwnProperty.call(message, "rdf")) + if (message.rdf != null && message.hasOwnProperty("rdf")) $root.protos.RoomDownsyncFrame.encode(message.rdf, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.inputFrameDownsyncBatch != null && message.inputFrameDownsyncBatch.length) for (var i = 0; i < message.inputFrameDownsyncBatch.length; ++i) $root.protos.InputFrameDownsync.encode(message.inputFrameDownsyncBatch[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.bciFrame != null && Object.hasOwnProperty.call(message, "bciFrame")) + if (message.bciFrame != null && message.hasOwnProperty("bciFrame")) $root.protos.BattleColliderInfo.encode(message.bciFrame, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -4648,32 +4337,26 @@ $root.protos = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.ret = reader.int32(); - break; - } - case 2: { - message.echoedMsgId = reader.int32(); - break; - } - case 3: { - message.act = reader.int32(); - break; - } - case 4: { - message.rdf = $root.protos.RoomDownsyncFrame.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.inputFrameDownsyncBatch && message.inputFrameDownsyncBatch.length)) - message.inputFrameDownsyncBatch = []; - message.inputFrameDownsyncBatch.push($root.protos.InputFrameDownsync.decode(reader, reader.uint32())); - break; - } - case 6: { - message.bciFrame = $root.protos.BattleColliderInfo.decode(reader, reader.uint32()); - break; - } + case 1: + message.ret = reader.int32(); + break; + case 2: + message.echoedMsgId = reader.int32(); + break; + case 3: + message.act = reader.int32(); + break; + case 4: + message.rdf = $root.protos.RoomDownsyncFrame.decode(reader, reader.uint32()); + break; + case 5: + if (!(message.inputFrameDownsyncBatch && message.inputFrameDownsyncBatch.length)) + message.inputFrameDownsyncBatch = []; + message.inputFrameDownsyncBatch.push($root.protos.InputFrameDownsync.decode(reader, reader.uint32())); + break; + case 6: + message.bciFrame = $root.protos.BattleColliderInfo.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -4832,21 +4515,6 @@ $root.protos = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for WsResp - * @function getTypeUrl - * @memberof protos.WsResp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WsResp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/protos.WsResp"; - }; - return WsResp; })();