Compare commits

...

2 Commits

Author SHA1 Message Date
genxium
360f2fc22b Simplified backend config loading. 2022-11-21 17:27:32 +08:00
yflu
2dbc529978 Fixes for jiggling character animation on resynced. 2022-11-21 00:23:01 +08:00
15 changed files with 559 additions and 902 deletions

View File

@@ -5,6 +5,7 @@ import (
. "battle_srv/common"
"battle_srv/common/utils"
"battle_srv/models"
. "battle_srv/protos"
"battle_srv/storage"
"bytes"
"crypto/sha256"
@@ -526,8 +527,10 @@ func (p *playerController) maybeCreatePlayerWechatAuthBinding(userInfo utils.Use
}
if player != nil {
updateInfo := models.Player{
Avatar: userInfo.HeadImgURL,
DisplayName: userInfo.Nickname,
PlayerDownsync: PlayerDownsync{
Avatar: userInfo.HeadImgURL,
DisplayName: userInfo.Nickname,
},
}
tx := storage.MySQLManagerIns.MustBegin()
defer tx.Rollback()
@@ -542,10 +545,12 @@ func (p *playerController) maybeCreatePlayerWechatAuthBinding(userInfo utils.Use
}
now := utils.UnixtimeMilli()
player := models.Player{
CreatedAt: now,
UpdatedAt: now,
DisplayName: userInfo.Nickname,
Avatar: userInfo.HeadImgURL,
PlayerDownsync: PlayerDownsync{
DisplayName: userInfo.Nickname,
Avatar: userInfo.HeadImgURL,
},
CreatedAt: now,
UpdatedAt: now,
}
return p.createNewPlayer(player, userInfo.OpenID, int(Constants.AuthChannel.Wechat))
}
@@ -562,8 +567,10 @@ func (p *playerController) maybeCreatePlayerWechatGameAuthBinding(userInfo utils
}
if player != nil {
updateInfo := models.Player{
Avatar: userInfo.HeadImgURL,
DisplayName: userInfo.Nickname,
PlayerDownsync: PlayerDownsync{
Avatar: userInfo.HeadImgURL,
DisplayName: userInfo.Nickname,
},
}
tx := storage.MySQLManagerIns.MustBegin()
defer tx.Rollback()
@@ -578,10 +585,12 @@ func (p *playerController) maybeCreatePlayerWechatGameAuthBinding(userInfo utils
}
now := utils.UnixtimeMilli()
player := models.Player{
CreatedAt: now,
UpdatedAt: now,
DisplayName: userInfo.Nickname,
Avatar: userInfo.HeadImgURL,
PlayerDownsync: PlayerDownsync{
DisplayName: userInfo.Nickname,
Avatar: userInfo.HeadImgURL,
},
CreatedAt: now,
UpdatedAt: now,
}
return p.createNewPlayer(player, userInfo.OpenID, int(Constants.AuthChannel.WechatGame))
}

View File

@@ -4,6 +4,7 @@ import (
. "battle_srv/common"
"battle_srv/common/utils"
"battle_srv/models"
. "battle_srv/protos"
"battle_srv/storage"
. "dnmshared"
sq "github.com/Masterminds/squirrel"
@@ -71,7 +72,6 @@ func createMysqlData(rows *sqlx.Rows, v string) {
}
}
// 加上tableName参数, 用于pre_conf_data.sqlite里bot_player表的复用 --kobako
func maybeCreateNewPlayerFromBotTable(db *sqlx.DB, tableName string) {
var ls []*dbBotPlayer
err := db.Select(&ls, "SELECT name, magic_phone_country_code, magic_phone_num, display_name FROM "+tableName)
@@ -88,7 +88,6 @@ func maybeCreateNewPlayerFromBotTable(db *sqlx.DB, tableName string) {
panic(err)
}
query = storage.MySQLManagerIns.Rebind(query)
// existNames := make([]string, len(ls), len(ls))
var existPlayers []*models.Player
err = storage.MySQLManagerIns.Select(&existPlayers, query, args...)
if nil != err {
@@ -99,13 +98,11 @@ func maybeCreateNewPlayerFromBotTable(db *sqlx.DB, tableName string) {
var flag bool
for _, v := range existPlayers {
if botPlayer.Name == v.Name {
// 已有数据,合并处理
flag = true
break
}
}
if !flag {
// 找不到,新增
Logger.Debug("create", zap.Any(tableName, botPlayer))
err := createNewBotPlayer(botPlayer)
if err != nil {
@@ -120,11 +117,14 @@ func createNewBotPlayer(p *dbBotPlayer) error {
defer tx.Rollback()
now := utils.UnixtimeMilli()
player := models.Player{
CreatedAt: now,
UpdatedAt: now,
Name: p.Name,
DisplayName: p.DisplayName,
CreatedAt: now,
UpdatedAt: now,
PlayerDownsync: PlayerDownsync{
Name: p.Name,
DisplayName: p.DisplayName,
},
}
err := player.Insert(tx)
if err != nil {
return err

View File

@@ -4,6 +4,7 @@ import (
. "battle_srv/common"
"battle_srv/common/utils"
"battle_srv/models"
. "battle_srv/protos"
"battle_srv/storage"
. "dnmshared"
@@ -75,9 +76,11 @@ func createNewPlayer(p *dbTestPlayer) error {
defer tx.Rollback()
now := utils.UnixtimeMilli()
player := models.Player{
PlayerDownsync: PlayerDownsync{
Name: p.Name,
},
CreatedAt: now,
UpdatedAt: now,
Name: p.Name,
}
err := player.Insert(tx)
if err != nil {

View File

@@ -5,7 +5,7 @@ import (
. "dnmshared/sharedprotos"
)
func toPbPlayers(modelInstances map[int32]*Player) map[int32]*PlayerDownsync {
func toPbPlayers(modelInstances map[int32]*Player, withMetaInfo bool) map[int32]*PlayerDownsync {
toRet := make(map[int32]*PlayerDownsync, 0)
if nil == modelInstances {
return toRet
@@ -20,11 +20,17 @@ func toPbPlayers(modelInstances map[int32]*Player) map[int32]*PlayerDownsync {
Dx: last.Dir.Dx,
Dy: last.Dir.Dy,
},
Speed: last.Speed,
BattleState: last.BattleState,
Score: last.Score,
Removed: last.Removed,
JoinIndex: last.JoinIndex,
ColliderRadius: last.ColliderRadius,
Speed: last.Speed,
BattleState: last.BattleState,
Score: last.Score,
Removed: last.Removed,
JoinIndex: last.JoinIndex,
}
if withMetaInfo {
toRet[k].Name = last.Name
toRet[k].DisplayName = last.DisplayName
toRet[k].Avatar = last.Avatar
}
}

View File

@@ -1,11 +1,14 @@
package models
import (
"database/sql"
. "battle_srv/protos"
"battle_srv/storage"
. "dnmshared"
. "dnmshared/sharedprotos"
"fmt"
sq "github.com/Masterminds/squirrel"
"github.com/jmoiron/sqlx"
"go.uber.org/zap"
)
type PlayerBattleState struct {
@@ -33,12 +36,7 @@ func InitPlayerBattleStateIns() {
}
type Player struct {
// Meta info fields
Id int32 `json:"id,omitempty" db:"id"`
Name string `json:"name,omitempty" db:"name"`
DisplayName string `json:"displayName,omitempty" db:"display_name"`
Avatar string `json:"avatar,omitempty"`
ColliderRadius float64 `json:"-"`
PlayerDownsync
// DB only fields
CreatedAt int64 `db:"created_at"`
@@ -46,19 +44,10 @@ type Player struct {
DeletedAt NullInt64 `db:"deleted_at"`
TutorialStage int `db:"tutorial_stage"`
// in-battle info fields
VirtualGridX int32
VirtualGridY int32
Dir *Direction
Speed int32
BattleState int32
LastMoveGmtMillis int32
Score int32
Removed bool
JoinIndex int32
// other in-battle info fields
LastSentInputFrameId int32
AckingFrameId int32
AckingInputFrameId int32
LastSentInputFrameId int32
}
func ExistPlayerByName(name string) (bool, error) {
@@ -74,15 +63,48 @@ func GetPlayerById(id int) (*Player, error) {
}
func getPlayer(cond sq.Eq) (*Player, error) {
var p Player
err := getObj("player", cond, &p)
if err == sql.ErrNoRows {
return nil, nil
p := Player{}
pd := PlayerDownsync{
Dir: &Direction{
Dx: 0,
Dy: 0,
},
}
p.Dir = &Direction{
Dx: 0,
Dy: 0,
query, args, err := sq.Select("*").From("player").Where(cond).Limit(1).ToSql()
if err != nil {
return nil, err
}
rows, err := storage.MySQLManagerIns.Queryx(query, args...)
if err != nil {
return nil, err
}
cols, err := rows.Columns()
if nil != err {
panic(err)
}
for rows.Next() {
// TODO: Do it more elegantly, but by now I don't have time to learn reflection of Golang
vals := rowValues(rows, cols)
for i, col := range cols {
val := *vals[i].(*interface{})
if "id" == col {
pd.Id = int32(val.(int64))
}
if "name" == col {
switch v := val.(type) {
case []byte:
pd.Name = string(v)
default:
pd.Name = fmt.Sprintf("%v", v)
}
}
if "created_at" == col {
p.CreatedAt = int64(val.(int64))
}
}
Logger.Info("Queried player from db", zap.Any("cond", cond), zap.Any("p", p), zap.Any("pd", pd), zap.Any("cols", cols), zap.Any("rowValues", vals))
}
p.PlayerDownsync = pd
return &p, nil
}
@@ -113,8 +135,6 @@ func Update(tx *sqlx.Tx, id int32, p *Player) (bool, error) {
}
result, err := tx.Exec(query, args...)
if err != nil {
fmt.Println("ERRRRRRR: ")
fmt.Println(err)
return false, err
}
rowsAffected, err := result.RowsAffected()

View File

@@ -10,6 +10,17 @@ import (
"go.uber.org/zap"
)
func rowValues(rows *sqlx.Rows, cols []string) []interface{} {
results := make([]interface{}, len(cols))
for i := range results {
results[i] = new(interface{})
}
if err := rows.Scan(results[:]...); err != nil {
panic(err)
}
return results
}
func exist(t string, cond sq.Eq) (bool, error) {
c, err := getCount(t, cond)
if err != nil {

View File

@@ -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 {
@@ -386,7 +375,7 @@ func (pR *Room) StartBattle() {
pR.CurDynamicsRenderFrameId = 0
kickoffFrame := &RoomDownsyncFrame{
Id: pR.RenderFrameId,
Players: toPbPlayers(pR.Players),
Players: toPbPlayers(pR.Players, false),
CountdownNanos: pR.BattleDurationNanos,
}
pR.RenderFrameBuffer.Put(kickoffFrame)
@@ -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<<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
if pR.BackendDynamicsEnabled && (shouldResync1 || shouldResync2) {
tmp := pR.RenderFrameBuffer.GetByFrameId(refRenderFrameId)
if nil == tmp {
@@ -553,26 +542,29 @@ func (pR *Room) StartBattle() {
}
}
toApplyInputFrameId := pR.ConvertToInputFrameId(refRenderFrameId, pR.InputDelayFrames)
minToKeepInputFrameId := pR.ConvertToInputFrameId(refRenderFrameId, pR.InputDelayFrames) - pR.SpAtkLookupFrames
/*
[WARNING]
The following updates to "toApplyInputFrameId" is necessary because when "false == pR.BackendDynamicsEnabled", the variable "refRenderFrameId" is not well defined.
The following updates to "minToKeepInputFrameId" is necessary because when "false == pR.BackendDynamicsEnabled", the variable "refRenderFrameId" is not well defined.
*/
minLastSentInputFrameId := int32(math.MaxInt32)
for _, player := range pR.Players {
if PlayerBattleStateIns.ACTIVE != player.BattleState {
continue
}
if player.LastSentInputFrameId >= 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)))
}
}
@@ -677,7 +669,7 @@ func (pR *Room) StopBattleForSettlement() {
for playerId, _ := range pR.Players {
assembledFrame := RoomDownsyncFrame{
Id: pR.RenderFrameId,
Players: toPbPlayers(pR.Players),
Players: toPbPlayers(pR.Players, false),
CountdownNanos: -1, // TODO: Replace this magic constant!
}
pR.sendSafely(&assembledFrame, nil, DOWNSYNC_MSG_ACT_BATTLE_STOPPED, playerId)
@@ -701,22 +693,9 @@ func (pR *Room) onBattlePrepare(cb BattleStartCbType) {
pR.State = RoomBattleStateIns.PREPARE
Logger.Info("Battle state transitted to RoomBattleStateIns.PREPARE for:", zap.Any("roomId", pR.Id))
playerMetas := make(map[int32]*PlayerDownsyncMeta, 0)
for _, player := range pR.Players {
playerMetas[player.Id] = &PlayerDownsyncMeta{
Id: player.Id,
Name: player.Name,
DisplayName: player.DisplayName,
Avatar: player.Avatar,
ColliderRadius: player.ColliderRadius, // hardcoded for now
JoinIndex: player.JoinIndex,
}
}
battleReadyToStartFrame := &RoomDownsyncFrame{
Id: DOWNSYNC_MSG_ACT_BATTLE_READY_TO_START,
Players: toPbPlayers(pR.Players),
PlayerMetas: playerMetas,
Players: toPbPlayers(pR.Players, true),
CountdownNanos: pR.BattleDurationNanos,
}
@@ -785,6 +764,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 +792,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 +904,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))
}
@@ -961,18 +941,6 @@ func (pR *Room) OnPlayerBattleColliderAcked(playerId int32) bool {
return false
}
playerMetas := make(map[int32]*PlayerDownsyncMeta, 0)
for _, eachPlayer := range pR.Players {
playerMetas[eachPlayer.Id] = &PlayerDownsyncMeta{
Id: eachPlayer.Id,
Name: eachPlayer.Name,
DisplayName: eachPlayer.DisplayName,
Avatar: eachPlayer.Avatar,
JoinIndex: eachPlayer.JoinIndex,
ColliderRadius: eachPlayer.ColliderRadius,
}
}
// Broadcast added or readded player info to all players in the same room
for _, eachPlayer := range pR.Players {
/*
@@ -986,16 +954,14 @@ func (pR *Room) OnPlayerBattleColliderAcked(playerId int32) bool {
switch targetPlayer.BattleState {
case PlayerBattleStateIns.ADDED_PENDING_BATTLE_COLLIDER_ACK:
playerAckedFrame := &RoomDownsyncFrame{
Id: pR.RenderFrameId,
Players: toPbPlayers(pR.Players),
PlayerMetas: playerMetas,
Id: pR.RenderFrameId,
Players: toPbPlayers(pR.Players, true),
}
pR.sendSafely(playerAckedFrame, nil, DOWNSYNC_MSG_ACT_PLAYER_ADDED_AND_ACKED, eachPlayer.Id)
case PlayerBattleStateIns.READDED_PENDING_BATTLE_COLLIDER_ACK:
playerAckedFrame := &RoomDownsyncFrame{
Id: pR.RenderFrameId,
Players: toPbPlayers(pR.Players),
PlayerMetas: playerMetas,
Id: pR.RenderFrameId,
Players: toPbPlayers(pR.Players, true),
}
pR.sendSafely(playerAckedFrame, nil, DOWNSYNC_MSG_ACT_PLAYER_READDED_AND_ACKED, eachPlayer.Id)
default:
@@ -1085,15 +1051,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 +1067,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)
}
@@ -1242,9 +1202,7 @@ 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
}
@@ -1281,20 +1239,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 {

View File

@@ -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
@@ -247,10 +255,14 @@ type PlayerDownsync struct {
Dir *sharedprotos.Direction `protobuf:"bytes,4,opt,name=dir,proto3" json:"dir,omitempty"`
Speed int32 `protobuf:"varint,5,opt,name=speed,proto3" json:"speed,omitempty"` // in terms of virtual grid units
BattleState int32 `protobuf:"varint,6,opt,name=battleState,proto3" json:"battleState,omitempty"`
LastMoveGmtMillis int32 `protobuf:"varint,7,opt,name=lastMoveGmtMillis,proto3" json:"lastMoveGmtMillis,omitempty"`
JoinIndex int32 `protobuf:"varint,7,opt,name=joinIndex,proto3" json:"joinIndex,omitempty"`
ColliderRadius float64 `protobuf:"fixed64,8,opt,name=colliderRadius,proto3" json:"colliderRadius,omitempty"`
Removed bool `protobuf:"varint,9,opt,name=removed,proto3" json:"removed,omitempty"`
Score int32 `protobuf:"varint,10,opt,name=score,proto3" json:"score,omitempty"`
Removed bool `protobuf:"varint,11,opt,name=removed,proto3" json:"removed,omitempty"`
JoinIndex int32 `protobuf:"varint,12,opt,name=joinIndex,proto3" json:"joinIndex,omitempty"`
LastMoveGmtMillis int32 `protobuf:"varint,11,opt,name=lastMoveGmtMillis,proto3" json:"lastMoveGmtMillis,omitempty"`
Name string `protobuf:"bytes,12,opt,name=name,proto3" json:"name,omitempty"`
DisplayName string `protobuf:"bytes,13,opt,name=displayName,proto3" json:"displayName,omitempty"`
Avatar string `protobuf:"bytes,14,opt,name=avatar,proto3" json:"avatar,omitempty"`
}
func (x *PlayerDownsync) Reset() {
@@ -327,16 +339,16 @@ func (x *PlayerDownsync) GetBattleState() int32 {
return 0
}
func (x *PlayerDownsync) GetLastMoveGmtMillis() int32 {
func (x *PlayerDownsync) GetJoinIndex() int32 {
if x != nil {
return x.LastMoveGmtMillis
return x.JoinIndex
}
return 0
}
func (x *PlayerDownsync) GetScore() int32 {
func (x *PlayerDownsync) GetColliderRadius() float64 {
if x != nil {
return x.Score
return x.ColliderRadius
}
return 0
}
@@ -348,100 +360,41 @@ func (x *PlayerDownsync) GetRemoved() bool {
return false
}
func (x *PlayerDownsync) GetJoinIndex() int32 {
func (x *PlayerDownsync) GetScore() int32 {
if x != nil {
return x.JoinIndex
return x.Score
}
return 0
}
type PlayerDownsyncMeta struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
DisplayName string `protobuf:"bytes,3,opt,name=displayName,proto3" json:"displayName,omitempty"`
Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"`
JoinIndex int32 `protobuf:"varint,5,opt,name=joinIndex,proto3" json:"joinIndex,omitempty"`
ColliderRadius float64 `protobuf:"fixed64,6,opt,name=colliderRadius,proto3" json:"colliderRadius,omitempty"`
}
func (x *PlayerDownsyncMeta) Reset() {
*x = PlayerDownsyncMeta{}
if protoimpl.UnsafeEnabled {
mi := &file_room_downsync_frame_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PlayerDownsyncMeta) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PlayerDownsyncMeta) ProtoMessage() {}
func (x *PlayerDownsyncMeta) ProtoReflect() protoreflect.Message {
mi := &file_room_downsync_frame_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PlayerDownsyncMeta.ProtoReflect.Descriptor instead.
func (*PlayerDownsyncMeta) Descriptor() ([]byte, []int) {
return file_room_downsync_frame_proto_rawDescGZIP(), []int{2}
}
func (x *PlayerDownsyncMeta) GetId() int32 {
func (x *PlayerDownsync) GetLastMoveGmtMillis() int32 {
if x != nil {
return x.Id
return x.LastMoveGmtMillis
}
return 0
}
func (x *PlayerDownsyncMeta) GetName() string {
func (x *PlayerDownsync) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *PlayerDownsyncMeta) GetDisplayName() string {
func (x *PlayerDownsync) GetDisplayName() string {
if x != nil {
return x.DisplayName
}
return ""
}
func (x *PlayerDownsyncMeta) GetAvatar() string {
func (x *PlayerDownsync) GetAvatar() string {
if x != nil {
return x.Avatar
}
return ""
}
func (x *PlayerDownsyncMeta) GetJoinIndex() int32 {
if x != nil {
return x.JoinIndex
}
return 0
}
func (x *PlayerDownsyncMeta) GetColliderRadius() float64 {
if x != nil {
return x.ColliderRadius
}
return 0
}
type InputFrameDecoded struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -455,7 +408,7 @@ type InputFrameDecoded struct {
func (x *InputFrameDecoded) Reset() {
*x = InputFrameDecoded{}
if protoimpl.UnsafeEnabled {
mi := &file_room_downsync_frame_proto_msgTypes[3]
mi := &file_room_downsync_frame_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -468,7 +421,7 @@ func (x *InputFrameDecoded) String() string {
func (*InputFrameDecoded) ProtoMessage() {}
func (x *InputFrameDecoded) ProtoReflect() protoreflect.Message {
mi := &file_room_downsync_frame_proto_msgTypes[3]
mi := &file_room_downsync_frame_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -481,7 +434,7 @@ func (x *InputFrameDecoded) ProtoReflect() protoreflect.Message {
// Deprecated: Use InputFrameDecoded.ProtoReflect.Descriptor instead.
func (*InputFrameDecoded) Descriptor() ([]byte, []int) {
return file_room_downsync_frame_proto_rawDescGZIP(), []int{3}
return file_room_downsync_frame_proto_rawDescGZIP(), []int{2}
}
func (x *InputFrameDecoded) GetDx() int32 {
@@ -517,7 +470,7 @@ type InputFrameUpsync struct {
func (x *InputFrameUpsync) Reset() {
*x = InputFrameUpsync{}
if protoimpl.UnsafeEnabled {
mi := &file_room_downsync_frame_proto_msgTypes[4]
mi := &file_room_downsync_frame_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -530,7 +483,7 @@ func (x *InputFrameUpsync) String() string {
func (*InputFrameUpsync) ProtoMessage() {}
func (x *InputFrameUpsync) ProtoReflect() protoreflect.Message {
mi := &file_room_downsync_frame_proto_msgTypes[4]
mi := &file_room_downsync_frame_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -543,7 +496,7 @@ func (x *InputFrameUpsync) ProtoReflect() protoreflect.Message {
// Deprecated: Use InputFrameUpsync.ProtoReflect.Descriptor instead.
func (*InputFrameUpsync) Descriptor() ([]byte, []int) {
return file_room_downsync_frame_proto_rawDescGZIP(), []int{4}
return file_room_downsync_frame_proto_rawDescGZIP(), []int{3}
}
func (x *InputFrameUpsync) GetInputFrameId() int32 {
@@ -573,7 +526,7 @@ type InputFrameDownsync struct {
func (x *InputFrameDownsync) Reset() {
*x = InputFrameDownsync{}
if protoimpl.UnsafeEnabled {
mi := &file_room_downsync_frame_proto_msgTypes[5]
mi := &file_room_downsync_frame_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -586,7 +539,7 @@ func (x *InputFrameDownsync) String() string {
func (*InputFrameDownsync) ProtoMessage() {}
func (x *InputFrameDownsync) ProtoReflect() protoreflect.Message {
mi := &file_room_downsync_frame_proto_msgTypes[5]
mi := &file_room_downsync_frame_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -599,7 +552,7 @@ func (x *InputFrameDownsync) ProtoReflect() protoreflect.Message {
// Deprecated: Use InputFrameDownsync.ProtoReflect.Descriptor instead.
func (*InputFrameDownsync) Descriptor() ([]byte, []int) {
return file_room_downsync_frame_proto_rawDescGZIP(), []int{5}
return file_room_downsync_frame_proto_rawDescGZIP(), []int{4}
}
func (x *InputFrameDownsync) GetInputFrameId() int32 {
@@ -634,7 +587,7 @@ type HeartbeatUpsync struct {
func (x *HeartbeatUpsync) Reset() {
*x = HeartbeatUpsync{}
if protoimpl.UnsafeEnabled {
mi := &file_room_downsync_frame_proto_msgTypes[6]
mi := &file_room_downsync_frame_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -647,7 +600,7 @@ func (x *HeartbeatUpsync) String() string {
func (*HeartbeatUpsync) ProtoMessage() {}
func (x *HeartbeatUpsync) ProtoReflect() protoreflect.Message {
mi := &file_room_downsync_frame_proto_msgTypes[6]
mi := &file_room_downsync_frame_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -660,7 +613,7 @@ func (x *HeartbeatUpsync) ProtoReflect() protoreflect.Message {
// Deprecated: Use HeartbeatUpsync.ProtoReflect.Descriptor instead.
func (*HeartbeatUpsync) Descriptor() ([]byte, []int) {
return file_room_downsync_frame_proto_rawDescGZIP(), []int{6}
return file_room_downsync_frame_proto_rawDescGZIP(), []int{5}
}
func (x *HeartbeatUpsync) GetClientTimestamp() int64 {
@@ -675,16 +628,15 @@ type RoomDownsyncFrame struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Players map[int32]*PlayerDownsync `protobuf:"bytes,2,rep,name=players,proto3" json:"players,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
CountdownNanos int64 `protobuf:"varint,3,opt,name=countdownNanos,proto3" json:"countdownNanos,omitempty"`
PlayerMetas map[int32]*PlayerDownsyncMeta `protobuf:"bytes,4,rep,name=playerMetas,proto3" json:"playerMetas,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Players map[int32]*PlayerDownsync `protobuf:"bytes,2,rep,name=players,proto3" json:"players,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
CountdownNanos int64 `protobuf:"varint,3,opt,name=countdownNanos,proto3" json:"countdownNanos,omitempty"`
}
func (x *RoomDownsyncFrame) Reset() {
*x = RoomDownsyncFrame{}
if protoimpl.UnsafeEnabled {
mi := &file_room_downsync_frame_proto_msgTypes[7]
mi := &file_room_downsync_frame_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -697,7 +649,7 @@ func (x *RoomDownsyncFrame) String() string {
func (*RoomDownsyncFrame) ProtoMessage() {}
func (x *RoomDownsyncFrame) ProtoReflect() protoreflect.Message {
mi := &file_room_downsync_frame_proto_msgTypes[7]
mi := &file_room_downsync_frame_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -710,7 +662,7 @@ func (x *RoomDownsyncFrame) ProtoReflect() protoreflect.Message {
// Deprecated: Use RoomDownsyncFrame.ProtoReflect.Descriptor instead.
func (*RoomDownsyncFrame) Descriptor() ([]byte, []int) {
return file_room_downsync_frame_proto_rawDescGZIP(), []int{7}
return file_room_downsync_frame_proto_rawDescGZIP(), []int{6}
}
func (x *RoomDownsyncFrame) GetId() int32 {
@@ -734,13 +686,6 @@ func (x *RoomDownsyncFrame) GetCountdownNanos() int64 {
return 0
}
func (x *RoomDownsyncFrame) GetPlayerMetas() map[int32]*PlayerDownsyncMeta {
if x != nil {
return x.PlayerMetas
}
return nil
}
type WsReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -759,7 +704,7 @@ type WsReq struct {
func (x *WsReq) Reset() {
*x = WsReq{}
if protoimpl.UnsafeEnabled {
mi := &file_room_downsync_frame_proto_msgTypes[8]
mi := &file_room_downsync_frame_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -772,7 +717,7 @@ func (x *WsReq) String() string {
func (*WsReq) ProtoMessage() {}
func (x *WsReq) ProtoReflect() protoreflect.Message {
mi := &file_room_downsync_frame_proto_msgTypes[8]
mi := &file_room_downsync_frame_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -785,7 +730,7 @@ func (x *WsReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use WsReq.ProtoReflect.Descriptor instead.
func (*WsReq) Descriptor() ([]byte, []int) {
return file_room_downsync_frame_proto_rawDescGZIP(), []int{8}
return file_room_downsync_frame_proto_rawDescGZIP(), []int{7}
}
func (x *WsReq) GetMsgId() int32 {
@@ -860,7 +805,7 @@ type WsResp struct {
func (x *WsResp) Reset() {
*x = WsResp{}
if protoimpl.UnsafeEnabled {
mi := &file_room_downsync_frame_proto_msgTypes[9]
mi := &file_room_downsync_frame_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -873,7 +818,7 @@ func (x *WsResp) String() string {
func (*WsResp) ProtoMessage() {}
func (x *WsResp) ProtoReflect() protoreflect.Message {
mi := &file_room_downsync_frame_proto_msgTypes[9]
mi := &file_room_downsync_frame_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -886,7 +831,7 @@ func (x *WsResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use WsResp.ProtoReflect.Descriptor instead.
func (*WsResp) Descriptor() ([]byte, []int) {
return file_room_downsync_frame_proto_rawDescGZIP(), []int{9}
return file_room_downsync_frame_proto_rawDescGZIP(), []int{8}
}
func (x *WsResp) GetRet() int32 {
@@ -937,7 +882,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 +955,124 @@ 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,
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,
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, 0xbd, 0x03, 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, 0x1c, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e,
0x64, 0x65, 0x78, 0x18, 0x07, 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, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x63, 0x6f,
0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07,
0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72,
0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18,
0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2c, 0x0a, 0x11,
0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x65, 0x47, 0x6d, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69,
0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x76,
0x65, 0x47, 0x6d, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x0c, 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, 0x0d, 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, 0x0e, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 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, 0xe1, 0x01, 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, 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, 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 (
@@ -1155,46 +1087,42 @@ func file_room_downsync_frame_proto_rawDescGZIP() []byte {
return file_room_downsync_frame_proto_rawDescData
}
var file_room_downsync_frame_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_room_downsync_frame_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_room_downsync_frame_proto_goTypes = []interface{}{
(*BattleColliderInfo)(nil), // 0: protos.BattleColliderInfo
(*PlayerDownsync)(nil), // 1: protos.PlayerDownsync
(*PlayerDownsyncMeta)(nil), // 2: protos.PlayerDownsyncMeta
(*InputFrameDecoded)(nil), // 3: protos.InputFrameDecoded
(*InputFrameUpsync)(nil), // 4: protos.InputFrameUpsync
(*InputFrameDownsync)(nil), // 5: protos.InputFrameDownsync
(*HeartbeatUpsync)(nil), // 6: protos.HeartbeatUpsync
(*RoomDownsyncFrame)(nil), // 7: protos.RoomDownsyncFrame
(*WsReq)(nil), // 8: protos.WsReq
(*WsResp)(nil), // 9: protos.WsResp
nil, // 10: protos.BattleColliderInfo.StrToVec2DListMapEntry
nil, // 11: protos.BattleColliderInfo.StrToPolygon2DListMapEntry
nil, // 12: protos.RoomDownsyncFrame.PlayersEntry
nil, // 13: protos.RoomDownsyncFrame.PlayerMetasEntry
(*sharedprotos.Direction)(nil), // 14: sharedprotos.Direction
(*sharedprotos.Vec2DList)(nil), // 15: sharedprotos.Vec2DList
(*sharedprotos.Polygon2DList)(nil), // 16: sharedprotos.Polygon2DList
(*InputFrameDecoded)(nil), // 2: protos.InputFrameDecoded
(*InputFrameUpsync)(nil), // 3: protos.InputFrameUpsync
(*InputFrameDownsync)(nil), // 4: protos.InputFrameDownsync
(*HeartbeatUpsync)(nil), // 5: protos.HeartbeatUpsync
(*RoomDownsyncFrame)(nil), // 6: protos.RoomDownsyncFrame
(*WsReq)(nil), // 7: protos.WsReq
(*WsResp)(nil), // 8: protos.WsResp
nil, // 9: protos.BattleColliderInfo.StrToVec2DListMapEntry
nil, // 10: protos.BattleColliderInfo.StrToPolygon2DListMapEntry
nil, // 11: protos.RoomDownsyncFrame.PlayersEntry
(*sharedprotos.Direction)(nil), // 12: sharedprotos.Direction
(*sharedprotos.Vec2DList)(nil), // 13: sharedprotos.Vec2DList
(*sharedprotos.Polygon2DList)(nil), // 14: sharedprotos.Polygon2DList
}
var file_room_downsync_frame_proto_depIdxs = []int32{
10, // 0: protos.BattleColliderInfo.strToVec2DListMap:type_name -> protos.BattleColliderInfo.StrToVec2DListMapEntry
11, // 1: protos.BattleColliderInfo.strToPolygon2DListMap:type_name -> protos.BattleColliderInfo.StrToPolygon2DListMapEntry
14, // 2: protos.PlayerDownsync.dir:type_name -> sharedprotos.Direction
12, // 3: protos.RoomDownsyncFrame.players:type_name -> protos.RoomDownsyncFrame.PlayersEntry
13, // 4: protos.RoomDownsyncFrame.playerMetas:type_name -> protos.RoomDownsyncFrame.PlayerMetasEntry
4, // 5: protos.WsReq.inputFrameUpsyncBatch:type_name -> protos.InputFrameUpsync
6, // 6: protos.WsReq.hb:type_name -> protos.HeartbeatUpsync
7, // 7: protos.WsResp.rdf:type_name -> protos.RoomDownsyncFrame
5, // 8: protos.WsResp.inputFrameDownsyncBatch:type_name -> protos.InputFrameDownsync
0, // 9: protos.WsResp.bciFrame:type_name -> protos.BattleColliderInfo
15, // 10: protos.BattleColliderInfo.StrToVec2DListMapEntry.value:type_name -> sharedprotos.Vec2DList
16, // 11: protos.BattleColliderInfo.StrToPolygon2DListMapEntry.value:type_name -> sharedprotos.Polygon2DList
1, // 12: protos.RoomDownsyncFrame.PlayersEntry.value:type_name -> protos.PlayerDownsync
2, // 13: protos.RoomDownsyncFrame.PlayerMetasEntry.value:type_name -> protos.PlayerDownsyncMeta
14, // [14:14] is the sub-list for method output_type
14, // [14:14] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension type_name
14, // [14:14] is the sub-list for extension extendee
0, // [0:14] is the sub-list for field type_name
9, // 0: protos.BattleColliderInfo.strToVec2DListMap:type_name -> protos.BattleColliderInfo.StrToVec2DListMapEntry
10, // 1: protos.BattleColliderInfo.strToPolygon2DListMap:type_name -> protos.BattleColliderInfo.StrToPolygon2DListMapEntry
12, // 2: protos.PlayerDownsync.dir:type_name -> sharedprotos.Direction
11, // 3: protos.RoomDownsyncFrame.players:type_name -> protos.RoomDownsyncFrame.PlayersEntry
3, // 4: protos.WsReq.inputFrameUpsyncBatch:type_name -> protos.InputFrameUpsync
5, // 5: protos.WsReq.hb:type_name -> protos.HeartbeatUpsync
6, // 6: protos.WsResp.rdf:type_name -> protos.RoomDownsyncFrame
4, // 7: protos.WsResp.inputFrameDownsyncBatch:type_name -> protos.InputFrameDownsync
0, // 8: protos.WsResp.bciFrame:type_name -> protos.BattleColliderInfo
13, // 9: protos.BattleColliderInfo.StrToVec2DListMapEntry.value:type_name -> sharedprotos.Vec2DList
14, // 10: protos.BattleColliderInfo.StrToPolygon2DListMapEntry.value:type_name -> sharedprotos.Polygon2DList
1, // 11: protos.RoomDownsyncFrame.PlayersEntry.value:type_name -> protos.PlayerDownsync
12, // [12:12] is the sub-list for method output_type
12, // [12:12] is the sub-list for method input_type
12, // [12:12] is the sub-list for extension type_name
12, // [12:12] is the sub-list for extension extendee
0, // [0:12] is the sub-list for field type_name
}
func init() { file_room_downsync_frame_proto_init() }
@@ -1228,18 +1156,6 @@ func file_room_downsync_frame_proto_init() {
}
}
file_room_downsync_frame_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PlayerDownsyncMeta); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_room_downsync_frame_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InputFrameDecoded); i {
case 0:
return &v.state
@@ -1251,7 +1167,7 @@ func file_room_downsync_frame_proto_init() {
return nil
}
}
file_room_downsync_frame_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
file_room_downsync_frame_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InputFrameUpsync); i {
case 0:
return &v.state
@@ -1263,7 +1179,7 @@ func file_room_downsync_frame_proto_init() {
return nil
}
}
file_room_downsync_frame_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
file_room_downsync_frame_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InputFrameDownsync); i {
case 0:
return &v.state
@@ -1275,7 +1191,7 @@ func file_room_downsync_frame_proto_init() {
return nil
}
}
file_room_downsync_frame_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
file_room_downsync_frame_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeartbeatUpsync); i {
case 0:
return &v.state
@@ -1287,7 +1203,7 @@ func file_room_downsync_frame_proto_init() {
return nil
}
}
file_room_downsync_frame_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
file_room_downsync_frame_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RoomDownsyncFrame); i {
case 0:
return &v.state
@@ -1299,7 +1215,7 @@ func file_room_downsync_frame_proto_init() {
return nil
}
}
file_room_downsync_frame_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
file_room_downsync_frame_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WsReq); i {
case 0:
return &v.state
@@ -1311,7 +1227,7 @@ func file_room_downsync_frame_proto_init() {
return nil
}
}
file_room_downsync_frame_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
file_room_downsync_frame_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WsResp); i {
case 0:
return &v.state
@@ -1330,7 +1246,7 @@ func file_room_downsync_frame_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_room_downsync_frame_proto_rawDesc,
NumEnums: 0,
NumMessages: 14,
NumMessages: 12,
NumExtensions: 0,
NumServices: 0,
},

View File

@@ -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{

View File

@@ -29,6 +29,8 @@ message BattleColliderInfo {
double worldToVirtualGridRatio = 21;
double virtualGridToWorldRatio = 22;
int32 spAtkLookupFrames = 23;
}
message PlayerDownsync {
@@ -38,19 +40,15 @@ message PlayerDownsync {
sharedprotos.Direction dir = 4;
int32 speed = 5; // in terms of virtual grid units
int32 battleState = 6;
int32 lastMoveGmtMillis = 7;
int32 joinIndex = 7;
double colliderRadius = 8;
bool removed = 9;
int32 score = 10;
bool removed = 11;
int32 joinIndex = 12;
}
int32 lastMoveGmtMillis = 11;
message PlayerDownsyncMeta {
int32 id = 1;
string name = 2;
string displayName = 3;
string avatar = 4;
int32 joinIndex = 5;
double colliderRadius = 6;
string name = 12;
string displayName = 13;
string avatar = 14;
}
message InputFrameDecoded {
@@ -78,7 +76,6 @@ message RoomDownsyncFrame {
int32 id = 1;
map<int32, PlayerDownsync> players = 2;
int64 countdownNanos = 3;
map<int32, PlayerDownsyncMeta> playerMetas = 4;
}
message WsReq {

View File

@@ -440,7 +440,7 @@
"array": [
0,
0,
216.50635094610968,
210.4441731196186,
0,
0,
0,

View File

@@ -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})`);
}
}
},

View File

@@ -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,
@@ -415,6 +417,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;
@@ -604,15 +607,13 @@ cc.Class({
}
const players = rdf.players;
const playerMetas = rdf.playerMetas;
self._initPlayerRichInfoDict(players, playerMetas);
self._initPlayerRichInfoDict(players);
// Show the top status indicators for IN_BATTLE
if (self.playersInfoNode) {
const playersInfoScriptIns = self.playersInfoNode.getComponent("PlayersInfo");
for (let i in playerMetas) {
const playerMeta = playerMetas[i];
playersInfoScriptIns.updateData(playerMeta);
for (let i in players) {
playersInfoScriptIns.updateData(players[i]);
}
}
@@ -712,7 +713,7 @@ cc.Class({
self.showPopupInCanvas(self.findingPlayerNode);
}
let findingPlayerScriptIns = self.findingPlayerNode.getComponent("FindingPlayer");
findingPlayerScriptIns.updatePlayersInfo(rdf.playerMetas);
findingPlayerScriptIns.updatePlayersInfo(rdf.players);
},
logBattleStats() {
@@ -754,12 +755,15 @@ 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");
} else if (2 == joinIndex) {
playerScriptIns.setSpecies("SoldierFireGhost");
playerScriptIns.animComp.node.scaleX = (-1.0);
if (0 == playerRichInfo.dir.dx && 0 == playerRichInfo.dir.dy) {
playerScriptIns.animComp.node.scaleX = (-1.0);
}
}
const wpos = self.virtualGridToWorldPos(vx, vy);
@@ -932,29 +936,27 @@ cc.Class({
if (null == self.findingPlayerNode.parent) return;
self.findingPlayerNode.parent.removeChild(self.findingPlayerNode);
if (null != rdf) {
self._initPlayerRichInfoDict(rdf.players, rdf.playerMetas);
self._initPlayerRichInfoDict(rdf.players);
}
},
onBattleReadyToStart(rdf) {
const self = this;
const players = rdf.players;
const playerMetas = rdf.playerMetas;
self._initPlayerRichInfoDict(players, playerMetas);
self._initPlayerRichInfoDict(players);
// Show the top status indicators for IN_BATTLE
if (self.playersInfoNode) {
const playersInfoScriptIns = self.playersInfoNode.getComponent("PlayersInfo");
for (let i in playerMetas) {
const playerMeta = playerMetas[i];
playersInfoScriptIns.updateData(playerMeta);
for (let i in players) {
playersInfoScriptIns.updateData(players[i]);
}
}
console.log("Calling `onBattleReadyToStart` with:", playerMetas);
console.log("Calling `onBattleReadyToStart` with:", players);
if (self.findingPlayerNode) {
const findingPlayerScriptIns = self.findingPlayerNode.getComponent("FindingPlayer");
findingPlayerScriptIns.hideExitButton();
findingPlayerScriptIns.updatePlayersInfo(playerMetas);
findingPlayerScriptIns.updatePlayersInfo(players);
}
// Delay to hide the "finding player" GUI, then show a countdown clock
@@ -970,6 +972,7 @@ cc.Class({
applyRoomDownsyncFrameDynamics(rdf) {
const self = this;
const delayedInputFrameForPrevRenderFrame = self.getCachedInputFrameDownsyncWithPrediction(self._convertToInputFrameId(rdf.id - 1, self.inputDelayFrames));
self.playerRichInfoDict.forEach((playerRichInfo, playerId) => {
const immediatePlayerInfo = rdf.players[playerId];
@@ -980,7 +983,10 @@ cc.Class({
playerRichInfo.node.setPosition(wpos[0], wpos[1]);
playerRichInfo.virtualGridX = immediatePlayerInfo.virtualGridX;
playerRichInfo.virtualGridY = immediatePlayerInfo.virtualGridY;
playerRichInfo.scriptIns.scheduleNewDirection(immediatePlayerInfo.dir, false);
if (null != delayedInputFrameForPrevRenderFrame) {
const decodedInput = self.ctrl.decodeInput(delayedInputFrameForPrevRenderFrame.inputList[playerRichInfo.joinIndex - 1]);
playerRichInfo.scriptIns.scheduleNewDirection(decodedInput, false);
}
playerRichInfo.scriptIns.updateSpeed(immediatePlayerInfo.speed);
});
},
@@ -1048,9 +1054,11 @@ cc.Class({
const newCpos = self.virtualGridToPlayerColliderPos(newVx, newVy, self.playerRichInfoArr[joinIndex - 1]);
playerCollider.x = newCpos[0];
playerCollider.y = newCpos[1];
// Update directions and thus would eventually update moving animation accordingly
nextRenderFramePlayers[playerId].dir.dx = decodedInput.dx;
nextRenderFramePlayers[playerId].dir.dy = decodedInput.dy;
if (0 != decodedInput.dx || 0 != decodedInput.dy) {
// Update directions and thus would eventually update moving animation accordingly
nextRenderFramePlayers[playerId].dir.dx = decodedInput.dx;
nextRenderFramePlayers[playerId].dir.dy = decodedInput.dy;
}
}
collisionSys.update();
@@ -1137,15 +1145,13 @@ cc.Class({
return latestRdf;
},
_initPlayerRichInfoDict(players, playerMetas) {
_initPlayerRichInfoDict(players) {
const self = this;
for (let k in players) {
const playerId = parseInt(k);
if (self.playerRichInfoDict.has(playerId)) continue; // Skip already put keys
const immediatePlayerInfo = players[playerId];
const immediatePlayerMeta = playerMetas[playerId];
self.playerRichInfoDict.set(playerId, immediatePlayerInfo);
Object.assign(self.playerRichInfoDict.get(playerId), immediatePlayerMeta);
const nodeAndScriptIns = self.spawnPlayerNode(immediatePlayerInfo.joinIndex, immediatePlayerInfo.virtualGridX, immediatePlayerInfo.virtualGridY, self.playerRichInfoDict.get(playerId));

View File

@@ -404,16 +404,16 @@ 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);
}
const btnALevel = ((encodedInput >> 4) & 1);
return {
return window.pb.protos.InputFrameDecoded.create({
dx: mappedDirection[0],
dy: mappedDirection[1],
a: btnALevel,
};
btnALevel: btnALevel,
});
},
});

View File

@@ -1213,6 +1213,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 +1409,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
@@ -1482,6 +1491,8 @@ $root.protos = (function() {
writer.uint32(/* id 21, wireType 1 =*/169).double(message.worldToVirtualGridRatio);
if (message.virtualGridToWorldRatio != null && Object.hasOwnProperty.call(message, "virtualGridToWorldRatio"))
writer.uint32(/* id 22, wireType 1 =*/177).double(message.virtualGridToWorldRatio);
if (message.spAtkLookupFrames != null && Object.hasOwnProperty.call(message, "spAtkLookupFrames"))
writer.uint32(/* id 23, wireType 0 =*/184).int32(message.spAtkLookupFrames);
return writer;
};
@@ -1642,6 +1653,10 @@ $root.protos = (function() {
message.virtualGridToWorldRatio = reader.double();
break;
}
case 23: {
message.spAtkLookupFrames = reader.int32();
break;
}
default:
reader.skipType(tag & 7);
break;
@@ -1757,6 +1772,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 +1864,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 +1915,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 +1974,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;
};
@@ -1997,10 +2020,14 @@ $root.protos = (function() {
* @property {sharedprotos.Direction|null} [dir] PlayerDownsync dir
* @property {number|null} [speed] PlayerDownsync speed
* @property {number|null} [battleState] PlayerDownsync battleState
* @property {number|null} [lastMoveGmtMillis] PlayerDownsync lastMoveGmtMillis
* @property {number|null} [score] PlayerDownsync score
* @property {boolean|null} [removed] PlayerDownsync removed
* @property {number|null} [joinIndex] PlayerDownsync joinIndex
* @property {number|null} [colliderRadius] PlayerDownsync colliderRadius
* @property {boolean|null} [removed] PlayerDownsync removed
* @property {number|null} [score] PlayerDownsync score
* @property {number|null} [lastMoveGmtMillis] PlayerDownsync lastMoveGmtMillis
* @property {string|null} [name] PlayerDownsync name
* @property {string|null} [displayName] PlayerDownsync displayName
* @property {string|null} [avatar] PlayerDownsync avatar
*/
/**
@@ -2067,20 +2094,20 @@ $root.protos = (function() {
PlayerDownsync.prototype.battleState = 0;
/**
* PlayerDownsync lastMoveGmtMillis.
* @member {number} lastMoveGmtMillis
* PlayerDownsync joinIndex.
* @member {number} joinIndex
* @memberof protos.PlayerDownsync
* @instance
*/
PlayerDownsync.prototype.lastMoveGmtMillis = 0;
PlayerDownsync.prototype.joinIndex = 0;
/**
* PlayerDownsync score.
* @member {number} score
* PlayerDownsync colliderRadius.
* @member {number} colliderRadius
* @memberof protos.PlayerDownsync
* @instance
*/
PlayerDownsync.prototype.score = 0;
PlayerDownsync.prototype.colliderRadius = 0;
/**
* PlayerDownsync removed.
@@ -2091,12 +2118,44 @@ $root.protos = (function() {
PlayerDownsync.prototype.removed = false;
/**
* PlayerDownsync joinIndex.
* @member {number} joinIndex
* PlayerDownsync score.
* @member {number} score
* @memberof protos.PlayerDownsync
* @instance
*/
PlayerDownsync.prototype.joinIndex = 0;
PlayerDownsync.prototype.score = 0;
/**
* PlayerDownsync lastMoveGmtMillis.
* @member {number} lastMoveGmtMillis
* @memberof protos.PlayerDownsync
* @instance
*/
PlayerDownsync.prototype.lastMoveGmtMillis = 0;
/**
* PlayerDownsync name.
* @member {string} name
* @memberof protos.PlayerDownsync
* @instance
*/
PlayerDownsync.prototype.name = "";
/**
* PlayerDownsync displayName.
* @member {string} displayName
* @memberof protos.PlayerDownsync
* @instance
*/
PlayerDownsync.prototype.displayName = "";
/**
* PlayerDownsync avatar.
* @member {string} avatar
* @memberof protos.PlayerDownsync
* @instance
*/
PlayerDownsync.prototype.avatar = "";
/**
* Creates a new PlayerDownsync instance using the specified properties.
@@ -2134,14 +2193,22 @@ $root.protos = (function() {
writer.uint32(/* id 5, wireType 0 =*/40).int32(message.speed);
if (message.battleState != null && Object.hasOwnProperty.call(message, "battleState"))
writer.uint32(/* id 6, wireType 0 =*/48).int32(message.battleState);
if (message.lastMoveGmtMillis != null && Object.hasOwnProperty.call(message, "lastMoveGmtMillis"))
writer.uint32(/* id 7, wireType 0 =*/56).int32(message.lastMoveGmtMillis);
if (message.joinIndex != null && Object.hasOwnProperty.call(message, "joinIndex"))
writer.uint32(/* id 7, wireType 0 =*/56).int32(message.joinIndex);
if (message.colliderRadius != null && Object.hasOwnProperty.call(message, "colliderRadius"))
writer.uint32(/* id 8, wireType 1 =*/65).double(message.colliderRadius);
if (message.removed != null && Object.hasOwnProperty.call(message, "removed"))
writer.uint32(/* id 9, wireType 0 =*/72).bool(message.removed);
if (message.score != null && Object.hasOwnProperty.call(message, "score"))
writer.uint32(/* id 10, wireType 0 =*/80).int32(message.score);
if (message.removed != null && Object.hasOwnProperty.call(message, "removed"))
writer.uint32(/* id 11, wireType 0 =*/88).bool(message.removed);
if (message.joinIndex != null && Object.hasOwnProperty.call(message, "joinIndex"))
writer.uint32(/* id 12, wireType 0 =*/96).int32(message.joinIndex);
if (message.lastMoveGmtMillis != null && Object.hasOwnProperty.call(message, "lastMoveGmtMillis"))
writer.uint32(/* id 11, wireType 0 =*/88).int32(message.lastMoveGmtMillis);
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
writer.uint32(/* id 12, wireType 2 =*/98).string(message.name);
if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
writer.uint32(/* id 13, wireType 2 =*/106).string(message.displayName);
if (message.avatar != null && Object.hasOwnProperty.call(message, "avatar"))
writer.uint32(/* id 14, wireType 2 =*/114).string(message.avatar);
return writer;
};
@@ -2201,7 +2268,15 @@ $root.protos = (function() {
break;
}
case 7: {
message.lastMoveGmtMillis = reader.int32();
message.joinIndex = reader.int32();
break;
}
case 8: {
message.colliderRadius = reader.double();
break;
}
case 9: {
message.removed = reader.bool();
break;
}
case 10: {
@@ -2209,11 +2284,19 @@ $root.protos = (function() {
break;
}
case 11: {
message.removed = reader.bool();
message.lastMoveGmtMillis = reader.int32();
break;
}
case 12: {
message.joinIndex = reader.int32();
message.name = reader.string();
break;
}
case 13: {
message.displayName = reader.string();
break;
}
case 14: {
message.avatar = reader.string();
break;
}
default:
@@ -2271,18 +2354,30 @@ $root.protos = (function() {
if (message.battleState != null && message.hasOwnProperty("battleState"))
if (!$util.isInteger(message.battleState))
return "battleState: integer expected";
if (message.lastMoveGmtMillis != null && message.hasOwnProperty("lastMoveGmtMillis"))
if (!$util.isInteger(message.lastMoveGmtMillis))
return "lastMoveGmtMillis: integer expected";
if (message.score != null && message.hasOwnProperty("score"))
if (!$util.isInteger(message.score))
return "score: integer expected";
if (message.removed != null && message.hasOwnProperty("removed"))
if (typeof message.removed !== "boolean")
return "removed: boolean expected";
if (message.joinIndex != null && message.hasOwnProperty("joinIndex"))
if (!$util.isInteger(message.joinIndex))
return "joinIndex: integer expected";
if (message.colliderRadius != null && message.hasOwnProperty("colliderRadius"))
if (typeof message.colliderRadius !== "number")
return "colliderRadius: number expected";
if (message.removed != null && message.hasOwnProperty("removed"))
if (typeof message.removed !== "boolean")
return "removed: boolean expected";
if (message.score != null && message.hasOwnProperty("score"))
if (!$util.isInteger(message.score))
return "score: integer expected";
if (message.lastMoveGmtMillis != null && message.hasOwnProperty("lastMoveGmtMillis"))
if (!$util.isInteger(message.lastMoveGmtMillis))
return "lastMoveGmtMillis: integer expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message.displayName != null && message.hasOwnProperty("displayName"))
if (!$util.isString(message.displayName))
return "displayName: string expected";
if (message.avatar != null && message.hasOwnProperty("avatar"))
if (!$util.isString(message.avatar))
return "avatar: string expected";
return null;
};
@@ -2313,14 +2408,22 @@ $root.protos = (function() {
message.speed = object.speed | 0;
if (object.battleState != null)
message.battleState = object.battleState | 0;
if (object.lastMoveGmtMillis != null)
message.lastMoveGmtMillis = object.lastMoveGmtMillis | 0;
if (object.score != null)
message.score = object.score | 0;
if (object.removed != null)
message.removed = Boolean(object.removed);
if (object.joinIndex != null)
message.joinIndex = object.joinIndex | 0;
if (object.colliderRadius != null)
message.colliderRadius = Number(object.colliderRadius);
if (object.removed != null)
message.removed = Boolean(object.removed);
if (object.score != null)
message.score = object.score | 0;
if (object.lastMoveGmtMillis != null)
message.lastMoveGmtMillis = object.lastMoveGmtMillis | 0;
if (object.name != null)
message.name = String(object.name);
if (object.displayName != null)
message.displayName = String(object.displayName);
if (object.avatar != null)
message.avatar = String(object.avatar);
return message;
};
@@ -2344,10 +2447,14 @@ $root.protos = (function() {
object.dir = null;
object.speed = 0;
object.battleState = 0;
object.lastMoveGmtMillis = 0;
object.score = 0;
object.removed = false;
object.joinIndex = 0;
object.colliderRadius = 0;
object.removed = false;
object.score = 0;
object.lastMoveGmtMillis = 0;
object.name = "";
object.displayName = "";
object.avatar = "";
}
if (message.id != null && message.hasOwnProperty("id"))
object.id = message.id;
@@ -2361,14 +2468,22 @@ $root.protos = (function() {
object.speed = message.speed;
if (message.battleState != null && message.hasOwnProperty("battleState"))
object.battleState = message.battleState;
if (message.lastMoveGmtMillis != null && message.hasOwnProperty("lastMoveGmtMillis"))
object.lastMoveGmtMillis = message.lastMoveGmtMillis;
if (message.score != null && message.hasOwnProperty("score"))
object.score = message.score;
if (message.removed != null && message.hasOwnProperty("removed"))
object.removed = message.removed;
if (message.joinIndex != null && message.hasOwnProperty("joinIndex"))
object.joinIndex = message.joinIndex;
if (message.colliderRadius != null && message.hasOwnProperty("colliderRadius"))
object.colliderRadius = options.json && !isFinite(message.colliderRadius) ? String(message.colliderRadius) : message.colliderRadius;
if (message.removed != null && message.hasOwnProperty("removed"))
object.removed = message.removed;
if (message.score != null && message.hasOwnProperty("score"))
object.score = message.score;
if (message.lastMoveGmtMillis != null && message.hasOwnProperty("lastMoveGmtMillis"))
object.lastMoveGmtMillis = message.lastMoveGmtMillis;
if (message.name != null && message.hasOwnProperty("name"))
object.name = message.name;
if (message.displayName != null && message.hasOwnProperty("displayName"))
object.displayName = message.displayName;
if (message.avatar != null && message.hasOwnProperty("avatar"))
object.avatar = message.avatar;
return object;
};
@@ -2401,325 +2516,6 @@ $root.protos = (function() {
return PlayerDownsync;
})();
protos.PlayerDownsyncMeta = (function() {
/**
* Properties of a PlayerDownsyncMeta.
* @memberof protos
* @interface IPlayerDownsyncMeta
* @property {number|null} [id] PlayerDownsyncMeta id
* @property {string|null} [name] PlayerDownsyncMeta name
* @property {string|null} [displayName] PlayerDownsyncMeta displayName
* @property {string|null} [avatar] PlayerDownsyncMeta avatar
* @property {number|null} [joinIndex] PlayerDownsyncMeta joinIndex
* @property {number|null} [colliderRadius] PlayerDownsyncMeta colliderRadius
*/
/**
* Constructs a new PlayerDownsyncMeta.
* @memberof protos
* @classdesc Represents a PlayerDownsyncMeta.
* @implements IPlayerDownsyncMeta
* @constructor
* @param {protos.IPlayerDownsyncMeta=} [properties] Properties to set
*/
function PlayerDownsyncMeta(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* PlayerDownsyncMeta id.
* @member {number} id
* @memberof protos.PlayerDownsyncMeta
* @instance
*/
PlayerDownsyncMeta.prototype.id = 0;
/**
* PlayerDownsyncMeta name.
* @member {string} name
* @memberof protos.PlayerDownsyncMeta
* @instance
*/
PlayerDownsyncMeta.prototype.name = "";
/**
* PlayerDownsyncMeta displayName.
* @member {string} displayName
* @memberof protos.PlayerDownsyncMeta
* @instance
*/
PlayerDownsyncMeta.prototype.displayName = "";
/**
* PlayerDownsyncMeta avatar.
* @member {string} avatar
* @memberof protos.PlayerDownsyncMeta
* @instance
*/
PlayerDownsyncMeta.prototype.avatar = "";
/**
* PlayerDownsyncMeta joinIndex.
* @member {number} joinIndex
* @memberof protos.PlayerDownsyncMeta
* @instance
*/
PlayerDownsyncMeta.prototype.joinIndex = 0;
/**
* PlayerDownsyncMeta colliderRadius.
* @member {number} colliderRadius
* @memberof protos.PlayerDownsyncMeta
* @instance
*/
PlayerDownsyncMeta.prototype.colliderRadius = 0;
/**
* Creates a new PlayerDownsyncMeta instance using the specified properties.
* @function create
* @memberof protos.PlayerDownsyncMeta
* @static
* @param {protos.IPlayerDownsyncMeta=} [properties] Properties to set
* @returns {protos.PlayerDownsyncMeta} PlayerDownsyncMeta instance
*/
PlayerDownsyncMeta.create = function create(properties) {
return new PlayerDownsyncMeta(properties);
};
/**
* Encodes the specified PlayerDownsyncMeta message. Does not implicitly {@link protos.PlayerDownsyncMeta.verify|verify} messages.
* @function encode
* @memberof protos.PlayerDownsyncMeta
* @static
* @param {protos.PlayerDownsyncMeta} message PlayerDownsyncMeta message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
PlayerDownsyncMeta.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.id != null && Object.hasOwnProperty.call(message, "id"))
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id);
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.name);
if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName);
if (message.avatar != null && Object.hasOwnProperty.call(message, "avatar"))
writer.uint32(/* id 4, wireType 2 =*/34).string(message.avatar);
if (message.joinIndex != null && Object.hasOwnProperty.call(message, "joinIndex"))
writer.uint32(/* id 5, wireType 0 =*/40).int32(message.joinIndex);
if (message.colliderRadius != null && Object.hasOwnProperty.call(message, "colliderRadius"))
writer.uint32(/* id 6, wireType 1 =*/49).double(message.colliderRadius);
return writer;
};
/**
* Encodes the specified PlayerDownsyncMeta message, length delimited. Does not implicitly {@link protos.PlayerDownsyncMeta.verify|verify} messages.
* @function encodeDelimited
* @memberof protos.PlayerDownsyncMeta
* @static
* @param {protos.PlayerDownsyncMeta} message PlayerDownsyncMeta message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
PlayerDownsyncMeta.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a PlayerDownsyncMeta message from the specified reader or buffer.
* @function decode
* @memberof protos.PlayerDownsyncMeta
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {protos.PlayerDownsyncMeta} PlayerDownsyncMeta
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
PlayerDownsyncMeta.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.PlayerDownsyncMeta();
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;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a PlayerDownsyncMeta message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof protos.PlayerDownsyncMeta
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {protos.PlayerDownsyncMeta} PlayerDownsyncMeta
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
PlayerDownsyncMeta.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a PlayerDownsyncMeta message.
* @function verify
* @memberof protos.PlayerDownsyncMeta
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
PlayerDownsyncMeta.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.id != null && message.hasOwnProperty("id"))
if (!$util.isInteger(message.id))
return "id: integer expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message.displayName != null && message.hasOwnProperty("displayName"))
if (!$util.isString(message.displayName))
return "displayName: string expected";
if (message.avatar != null && message.hasOwnProperty("avatar"))
if (!$util.isString(message.avatar))
return "avatar: string expected";
if (message.joinIndex != null && message.hasOwnProperty("joinIndex"))
if (!$util.isInteger(message.joinIndex))
return "joinIndex: integer expected";
if (message.colliderRadius != null && message.hasOwnProperty("colliderRadius"))
if (typeof message.colliderRadius !== "number")
return "colliderRadius: number expected";
return null;
};
/**
* Creates a PlayerDownsyncMeta message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof protos.PlayerDownsyncMeta
* @static
* @param {Object.<string,*>} object Plain object
* @returns {protos.PlayerDownsyncMeta} PlayerDownsyncMeta
*/
PlayerDownsyncMeta.fromObject = function fromObject(object) {
if (object instanceof $root.protos.PlayerDownsyncMeta)
return object;
var message = new $root.protos.PlayerDownsyncMeta();
if (object.id != null)
message.id = object.id | 0;
if (object.name != null)
message.name = String(object.name);
if (object.displayName != null)
message.displayName = String(object.displayName);
if (object.avatar != null)
message.avatar = String(object.avatar);
if (object.joinIndex != null)
message.joinIndex = object.joinIndex | 0;
if (object.colliderRadius != null)
message.colliderRadius = Number(object.colliderRadius);
return message;
};
/**
* Creates a plain object from a PlayerDownsyncMeta message. Also converts values to other types if specified.
* @function toObject
* @memberof protos.PlayerDownsyncMeta
* @static
* @param {protos.PlayerDownsyncMeta} message PlayerDownsyncMeta
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
PlayerDownsyncMeta.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.id = 0;
object.name = "";
object.displayName = "";
object.avatar = "";
object.joinIndex = 0;
object.colliderRadius = 0;
}
if (message.id != null && message.hasOwnProperty("id"))
object.id = message.id;
if (message.name != null && message.hasOwnProperty("name"))
object.name = message.name;
if (message.displayName != null && message.hasOwnProperty("displayName"))
object.displayName = message.displayName;
if (message.avatar != null && message.hasOwnProperty("avatar"))
object.avatar = message.avatar;
if (message.joinIndex != null && message.hasOwnProperty("joinIndex"))
object.joinIndex = message.joinIndex;
if (message.colliderRadius != null && message.hasOwnProperty("colliderRadius"))
object.colliderRadius = options.json && !isFinite(message.colliderRadius) ? String(message.colliderRadius) : message.colliderRadius;
return object;
};
/**
* Converts this PlayerDownsyncMeta to JSON.
* @function toJSON
* @memberof protos.PlayerDownsyncMeta
* @instance
* @returns {Object.<string,*>} JSON object
*/
PlayerDownsyncMeta.prototype.toJSON = function toJSON() {
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;
})();
protos.InputFrameDecoded = (function() {
/**
@@ -3736,7 +3532,6 @@ $root.protos = (function() {
* @property {number|null} [id] RoomDownsyncFrame id
* @property {Object.<string,protos.PlayerDownsync>|null} [players] RoomDownsyncFrame players
* @property {number|Long|null} [countdownNanos] RoomDownsyncFrame countdownNanos
* @property {Object.<string,protos.PlayerDownsyncMeta>|null} [playerMetas] RoomDownsyncFrame playerMetas
*/
/**
@@ -3749,7 +3544,6 @@ $root.protos = (function() {
*/
function RoomDownsyncFrame(properties) {
this.players = {};
this.playerMetas = {};
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -3780,14 +3574,6 @@ $root.protos = (function() {
*/
RoomDownsyncFrame.prototype.countdownNanos = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* RoomDownsyncFrame playerMetas.
* @member {Object.<string,protos.PlayerDownsyncMeta>} playerMetas
* @memberof protos.RoomDownsyncFrame
* @instance
*/
RoomDownsyncFrame.prototype.playerMetas = $util.emptyObject;
/**
* Creates a new RoomDownsyncFrame instance using the specified properties.
* @function create
@@ -3821,11 +3607,6 @@ $root.protos = (function() {
}
if (message.countdownNanos != null && Object.hasOwnProperty.call(message, "countdownNanos"))
writer.uint32(/* id 3, wireType 0 =*/24).int64(message.countdownNanos);
if (message.playerMetas != null && Object.hasOwnProperty.call(message, "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();
}
return writer;
};
@@ -3891,29 +3672,6 @@ $root.protos = (function() {
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;
}
default:
reader.skipType(tag & 7);
break;
@@ -3969,20 +3727,6 @@ $root.protos = (function() {
if (message.countdownNanos != null && message.hasOwnProperty("countdownNanos"))
if (!$util.isInteger(message.countdownNanos) && !(message.countdownNanos && $util.isInteger(message.countdownNanos.low) && $util.isInteger(message.countdownNanos.high)))
return "countdownNanos: integer|Long expected";
if (message.playerMetas != null && message.hasOwnProperty("playerMetas")) {
if (!$util.isObject(message.playerMetas))
return "playerMetas: object expected";
var key = Object.keys(message.playerMetas);
for (var i = 0; i < key.length; ++i) {
if (!$util.key32Re.test(key[i]))
return "playerMetas: integer key{k:int32} expected";
{
var error = $root.protos.PlayerDownsyncMeta.verify(message.playerMetas[key[i]]);
if (error)
return "playerMetas." + error;
}
}
}
return null;
};
@@ -4019,16 +3763,6 @@ $root.protos = (function() {
message.countdownNanos = object.countdownNanos;
else if (typeof object.countdownNanos === "object")
message.countdownNanos = new $util.LongBits(object.countdownNanos.low >>> 0, object.countdownNanos.high >>> 0).toNumber();
if (object.playerMetas) {
if (typeof object.playerMetas !== "object")
throw TypeError(".protos.RoomDownsyncFrame.playerMetas: object expected");
message.playerMetas = {};
for (var keys = Object.keys(object.playerMetas), i = 0; i < keys.length; ++i) {
if (typeof object.playerMetas[keys[i]] !== "object")
throw TypeError(".protos.RoomDownsyncFrame.playerMetas: object expected");
message.playerMetas[keys[i]] = $root.protos.PlayerDownsyncMeta.fromObject(object.playerMetas[keys[i]]);
}
}
return message;
};
@@ -4045,10 +3779,8 @@ $root.protos = (function() {
if (!options)
options = {};
var object = {};
if (options.objects || options.defaults) {
if (options.objects || options.defaults)
object.players = {};
object.playerMetas = {};
}
if (options.defaults) {
object.id = 0;
if ($util.Long) {
@@ -4070,11 +3802,6 @@ $root.protos = (function() {
object.countdownNanos = options.longs === String ? String(message.countdownNanos) : message.countdownNanos;
else
object.countdownNanos = options.longs === String ? $util.Long.prototype.toString.call(message.countdownNanos) : options.longs === Number ? new $util.LongBits(message.countdownNanos.low >>> 0, message.countdownNanos.high >>> 0).toNumber() : message.countdownNanos;
if (message.playerMetas && (keys2 = Object.keys(message.playerMetas)).length) {
object.playerMetas = {};
for (var j = 0; j < keys2.length; ++j)
object.playerMetas[keys2[j]] = $root.protos.PlayerDownsyncMeta.toObject(message.playerMetas[keys2[j]], options);
}
return object;
};