Compare commits
29 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b79e2dc935 | ||
|
7b0c807496 | ||
|
5c611b626d | ||
|
38149279bd | ||
|
a762c563d9 | ||
|
6a0d729dee | ||
|
f10389bf55 | ||
|
6b3d1ed49a | ||
|
d25bb5ff10 | ||
|
d38d4b4ec9 | ||
|
03828db6ff | ||
|
917fca2bcd | ||
|
680e4f1f59 | ||
|
f367609276 | ||
|
70ae4a4c92 | ||
|
6f561bea87 | ||
|
70a86c27b0 | ||
|
b0f37d2237 | ||
|
09376b827d | ||
|
d560392c79 | ||
|
c75f642011 | ||
|
5cfcac6cf6 | ||
|
d37ebd4c33 | ||
|
1d138b17c3 | ||
|
851678e2f3 | ||
|
2fb6fd6bea | ||
|
e3440a2a06 | ||
|
8de2d6e4e7 | ||
|
ba2dd0b22e |
19
README.md
@@ -2,20 +2,15 @@
|
||||
|
||||
This project is a demo for a websocket-based rollback netcode inspired by [GGPO](https://github.com/pond3r/ggpo/blob/master/doc/README.md).
|
||||
|
||||
[Demo recorded over INTERNET (Phone-Wifi v.s. PC-Wifi UDP holepunched) using an input delay of 6 frames](https://pan.baidu.com/s/1UArwqDShLoPjYppjjqsTqQ?pwd=10wc), and it feels SMOOTH when playing!
|
||||
|
||||

|
||||
|
||||
As lots of feedbacks ask for a discussion on using UDP instead, I tried to summarize my personal opinion about it in [ConcerningEdgeCases](./ConcerningEdgeCases.md) -- **since v0.9.25, the project is actually equipped with UDP capabilities as follows**.
|
||||
- When using the so called `native apps` on `Android` and `Windows` (I'm working casually hard to support `iOS` next), the frontends will try to use UDP hole-punching w/ the help of backend as a registry. If UDP hole-punching is working, the rollback is often less than `turn-around frames to recover` and thus not noticeable, being much better than using websocket alone.
|
||||
- If UDP hole-punching is not working, e.g. for Symmetric NAT like in 4G/5G cellular network, the frontends will use backend as a UDP tunnel (or relay, whatever you like to call it). This video shows how the UDP tunnel performs for a [Phone-4G v.s. PC-Wifi (viewed by PC side)](https://pan.baidu.com/s/1wdUTvRiyrTLWy7mF6G7uyQ?pwd=icmp).
|
||||
- When using the so called `native apps` on `Android` and `Windows` (I'm working casually hard to support `iOS` next), the frontends will try to use UDP hole-punching w/ the help of backend as a registry. If UDP hole-punching is working, the rollback is often less than `turn-around frames to recover` and thus not noticeable, being much better than using websocket alone. This video shows how the UDP holepunched p2p performs for [Phone-Wifi v.s. PC-Wifi (viewed by PC side)](https://pan.baidu.com/s/1K6704bJKlrSBTVqGcXhajA?pwd=l7ok).
|
||||
- If UDP hole-punching is not working, e.g. for Symmetric NAT like in 4G/5G cellular network, the frontends will use backend as a UDP tunnel (or relay, whatever you like to call it). This video shows how the UDP tunnel performs for [Phone-4G v.s. PC-Wifi (viewed by PC side)](https://pan.baidu.com/s/1IZVa5wVgAdeH6D-xsZYFUw?pwd=dgkj).
|
||||
- Browser vs `native app` is possible but in that case only websocket is used.
|
||||
|
||||
The following video is recorded over INTERNET using an input delay of 4 frames and it feels SMOOTH when playing! Please also checkout these demo videos
|
||||
- [source video of the first gif (earlier version)](https://pan.baidu.com/s/1ML6hNupaPHPJRd5rcTvQvw?pwd=8ruc)
|
||||
- [source video of the second gif (added turn-around optimization & dashing)](https://pan.baidu.com/s/1isMcLvxax4NNkDgitV_FDg?pwd=s1i6)
|
||||
|
||||
to see how this demo carries out a full 60fps synchronization with the help of _batched input upsync/downsync_ for satisfying network I/O performance.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
# Notable Features
|
||||
- Backend dynamics toggle via [Room.BackendDynamicsEnabled](https://github.com/genxium/DelayNoMore/blob/v0.9.14/battle_srv/models/room.go#L786)
|
||||
@@ -27,7 +22,7 @@ _(how input delay roughly works)_
|
||||
|
||||

|
||||
|
||||
_(how rollback-and-chase in this project roughly works, kindly note that by the current implementation, each frontend only maintains a `lastAllConfirmedInputFrameId` for all the other peers, because the backend only downsyncs all-confirmed inputFrames, see [markConfirmationIfApplicable](https://github.com/genxium/DelayNoMore/blob/v0.9.14/battle_srv/models/room.go#L1085) for more information -- if a serverless peer-to-peer communication is seriously needed here, consider porting [markConfirmationIfApplicable](https://github.com/genxium/DelayNoMore/blob/v0.9.14/battle_srv/models/room.go#L1085) into frontend for maintaining `lastAllConfirmedInputFrameId` under chaotic reception order of inputFrames from peers)_
|
||||
_(how rollback-and-chase in this project roughly works)_
|
||||
|
||||

|
||||

|
||||
|
@@ -22,34 +22,36 @@ func toPbRoomDownsyncFrame(rdf *battle.RoomDownsyncFrame) *pb.RoomDownsyncFrame
|
||||
|
||||
for i, last := range rdf.PlayersArr {
|
||||
pbPlayer := &pb.PlayerDownsync{
|
||||
Id: last.Id,
|
||||
VirtualGridX: last.VirtualGridX,
|
||||
VirtualGridY: last.VirtualGridY,
|
||||
DirX: last.DirX,
|
||||
DirY: last.DirY,
|
||||
VelX: last.VelX,
|
||||
VelY: last.VelY,
|
||||
FramesToRecover: last.FramesToRecover,
|
||||
FramesInChState: last.FramesInChState,
|
||||
ActiveSkillId: last.ActiveSkillId,
|
||||
ActiveSkillHit: last.ActiveSkillHit,
|
||||
FramesInvinsible: last.FramesInvinsible,
|
||||
Speed: last.Speed,
|
||||
BattleState: last.BattleState,
|
||||
CharacterState: last.CharacterState,
|
||||
InAir: last.InAir,
|
||||
OnWall: last.OnWall,
|
||||
OnWallNormX: last.OnWallNormX,
|
||||
OnWallNormY: last.OnWallNormY,
|
||||
CapturedByInertia: last.CapturedByInertia,
|
||||
JoinIndex: last.JoinIndex,
|
||||
BulletTeamId: last.BulletTeamId,
|
||||
ChCollisionTeamId: last.ChCollisionTeamId,
|
||||
Hp: last.Hp,
|
||||
MaxHp: last.MaxHp,
|
||||
ColliderRadius: last.ColliderRadius,
|
||||
Score: last.Score,
|
||||
Removed: last.Removed,
|
||||
Id: last.Id,
|
||||
VirtualGridX: last.VirtualGridX,
|
||||
VirtualGridY: last.VirtualGridY,
|
||||
DirX: last.DirX,
|
||||
DirY: last.DirY,
|
||||
VelX: last.VelX,
|
||||
VelY: last.VelY,
|
||||
FramesToRecover: last.FramesToRecover,
|
||||
FramesInChState: last.FramesInChState,
|
||||
ActiveSkillId: last.ActiveSkillId,
|
||||
ActiveSkillHit: last.ActiveSkillHit,
|
||||
FramesInvinsible: last.FramesInvinsible,
|
||||
Speed: last.Speed,
|
||||
BattleState: last.BattleState,
|
||||
CharacterState: last.CharacterState,
|
||||
InAir: last.InAir,
|
||||
OnWall: last.OnWall,
|
||||
OnWallNormX: last.OnWallNormX,
|
||||
OnWallNormY: last.OnWallNormY,
|
||||
CapturedByInertia: last.CapturedByInertia,
|
||||
JoinIndex: last.JoinIndex,
|
||||
BulletTeamId: last.BulletTeamId,
|
||||
ChCollisionTeamId: last.ChCollisionTeamId,
|
||||
Hp: last.Hp,
|
||||
MaxHp: last.MaxHp,
|
||||
RevivalVirtualGridX: last.RevivalVirtualGridX,
|
||||
RevivalVirtualGridY: last.RevivalVirtualGridY,
|
||||
ColliderRadius: last.ColliderRadius,
|
||||
Score: last.Score,
|
||||
Removed: last.Removed,
|
||||
}
|
||||
ret.PlayersArr[i] = pbPlayer
|
||||
}
|
||||
@@ -147,32 +149,36 @@ func toPbPlayers(modelInstances map[int32]*Player, withMetaInfo bool) []*pb.Play
|
||||
|
||||
for _, last := range modelInstances {
|
||||
pbPlayer := &pb.PlayerDownsync{
|
||||
Id: last.Id,
|
||||
VirtualGridX: last.VirtualGridX,
|
||||
VirtualGridY: last.VirtualGridY,
|
||||
DirX: last.DirX,
|
||||
DirY: last.DirY,
|
||||
VelX: last.VelX,
|
||||
VelY: last.VelY,
|
||||
FramesToRecover: last.FramesToRecover,
|
||||
FramesInChState: last.FramesInChState,
|
||||
ActiveSkillId: last.ActiveSkillId,
|
||||
ActiveSkillHit: last.ActiveSkillHit,
|
||||
FramesInvinsible: last.FramesInvinsible,
|
||||
Speed: last.Speed,
|
||||
BattleState: last.BattleState,
|
||||
CharacterState: last.CharacterState,
|
||||
InAir: last.InAir,
|
||||
OnWall: last.OnWall,
|
||||
OnWallNormX: last.OnWallNormX,
|
||||
OnWallNormY: last.OnWallNormY,
|
||||
CapturedByInertia: last.CapturedByInertia,
|
||||
JoinIndex: last.JoinIndex,
|
||||
BulletTeamId: last.BulletTeamId,
|
||||
ChCollisionTeamId: last.ChCollisionTeamId,
|
||||
ColliderRadius: last.ColliderRadius,
|
||||
Score: last.Score,
|
||||
Removed: last.Removed,
|
||||
Id: last.Id,
|
||||
VirtualGridX: last.VirtualGridX,
|
||||
VirtualGridY: last.VirtualGridY,
|
||||
DirX: last.DirX,
|
||||
DirY: last.DirY,
|
||||
VelX: last.VelX,
|
||||
VelY: last.VelY,
|
||||
FramesToRecover: last.FramesToRecover,
|
||||
FramesInChState: last.FramesInChState,
|
||||
ActiveSkillId: last.ActiveSkillId,
|
||||
ActiveSkillHit: last.ActiveSkillHit,
|
||||
FramesInvinsible: last.FramesInvinsible,
|
||||
Speed: last.Speed,
|
||||
BattleState: last.BattleState,
|
||||
CharacterState: last.CharacterState,
|
||||
InAir: last.InAir,
|
||||
OnWall: last.OnWall,
|
||||
OnWallNormX: last.OnWallNormX,
|
||||
OnWallNormY: last.OnWallNormY,
|
||||
CapturedByInertia: last.CapturedByInertia,
|
||||
JoinIndex: last.JoinIndex,
|
||||
BulletTeamId: last.BulletTeamId,
|
||||
ChCollisionTeamId: last.ChCollisionTeamId,
|
||||
Hp: last.Hp,
|
||||
MaxHp: last.MaxHp,
|
||||
RevivalVirtualGridX: last.RevivalVirtualGridX,
|
||||
RevivalVirtualGridY: last.RevivalVirtualGridY,
|
||||
ColliderRadius: last.ColliderRadius,
|
||||
Score: last.Score,
|
||||
Removed: last.Removed,
|
||||
}
|
||||
if withMetaInfo {
|
||||
pbPlayer.Name = last.Name
|
||||
@@ -193,34 +199,36 @@ func toJsPlayers(modelInstances map[int32]*Player) []*battle.PlayerDownsync {
|
||||
|
||||
for _, last := range modelInstances {
|
||||
toRet[last.JoinIndex-1] = &battle.PlayerDownsync{
|
||||
Id: last.Id,
|
||||
VirtualGridX: last.VirtualGridX,
|
||||
VirtualGridY: last.VirtualGridY,
|
||||
DirX: last.DirX,
|
||||
DirY: last.DirY,
|
||||
VelX: last.VelX,
|
||||
VelY: last.VelY,
|
||||
FramesToRecover: last.FramesToRecover,
|
||||
FramesInChState: last.FramesInChState,
|
||||
ActiveSkillId: last.ActiveSkillId,
|
||||
ActiveSkillHit: last.ActiveSkillHit,
|
||||
FramesInvinsible: last.FramesInvinsible,
|
||||
Speed: last.Speed,
|
||||
BattleState: last.BattleState,
|
||||
CharacterState: last.CharacterState,
|
||||
JoinIndex: last.JoinIndex,
|
||||
BulletTeamId: last.BulletTeamId,
|
||||
ChCollisionTeamId: last.ChCollisionTeamId,
|
||||
Hp: last.Hp,
|
||||
MaxHp: last.MaxHp,
|
||||
ColliderRadius: last.ColliderRadius,
|
||||
InAir: last.InAir,
|
||||
OnWall: last.OnWall,
|
||||
OnWallNormX: last.OnWallNormX,
|
||||
OnWallNormY: last.OnWallNormY,
|
||||
CapturedByInertia: last.CapturedByInertia,
|
||||
Score: last.Score,
|
||||
Removed: last.Removed,
|
||||
Id: last.Id,
|
||||
VirtualGridX: last.VirtualGridX,
|
||||
VirtualGridY: last.VirtualGridY,
|
||||
DirX: last.DirX,
|
||||
DirY: last.DirY,
|
||||
VelX: last.VelX,
|
||||
VelY: last.VelY,
|
||||
FramesToRecover: last.FramesToRecover,
|
||||
FramesInChState: last.FramesInChState,
|
||||
ActiveSkillId: last.ActiveSkillId,
|
||||
ActiveSkillHit: last.ActiveSkillHit,
|
||||
FramesInvinsible: last.FramesInvinsible,
|
||||
Speed: last.Speed,
|
||||
BattleState: last.BattleState,
|
||||
CharacterState: last.CharacterState,
|
||||
JoinIndex: last.JoinIndex,
|
||||
BulletTeamId: last.BulletTeamId,
|
||||
ChCollisionTeamId: last.ChCollisionTeamId,
|
||||
Hp: last.Hp,
|
||||
MaxHp: last.MaxHp,
|
||||
RevivalVirtualGridX: last.RevivalVirtualGridX,
|
||||
RevivalVirtualGridY: last.RevivalVirtualGridY,
|
||||
ColliderRadius: last.ColliderRadius,
|
||||
InAir: last.InAir,
|
||||
OnWall: last.OnWall,
|
||||
OnWallNormX: last.OnWallNormX,
|
||||
OnWallNormY: last.OnWallNormY,
|
||||
CapturedByInertia: last.CapturedByInertia,
|
||||
Score: last.Score,
|
||||
Removed: last.Removed,
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -47,10 +47,11 @@ type Player struct {
|
||||
TutorialStage int `db:"tutorial_stage"`
|
||||
|
||||
// other in-battle info fields
|
||||
LastReceivedInputFrameId int32
|
||||
LastSentInputFrameId int32
|
||||
AckingFrameId int32
|
||||
AckingInputFrameId int32
|
||||
LastReceivedInputFrameId int32
|
||||
LastUdpReceivedInputFrameId int32
|
||||
LastSentInputFrameId int32
|
||||
AckingFrameId int32
|
||||
AckingInputFrameId int32
|
||||
|
||||
UdpAddr *PeerUdpAddr
|
||||
BattleUdpTunnelAddr *net.UDPAddr // This addr is used by backend only, not visible to frontend
|
||||
|
@@ -136,7 +136,7 @@ type Room struct {
|
||||
EffectivePlayerCount int32
|
||||
DismissalWaitGroup sync.WaitGroup
|
||||
InputsBuffer *battle.RingBuffer // Indices are STRICTLY consecutive
|
||||
InputsBufferLock sync.Mutex // Guards [InputsBuffer, LatestPlayerUpsyncedInputFrameId, LastAllConfirmedInputFrameId, LastAllConfirmedInputList, LastAllConfirmedInputFrameIdWithChange, LastIndividuallyConfirmedInputList, player.LastReceivedInputFrameId]
|
||||
InputsBufferLock sync.Mutex // Guards [InputsBuffer, LatestPlayerUpsyncedInputFrameId, LastAllConfirmedInputFrameId, LastAllConfirmedInputList, LastAllConfirmedInputFrameIdWithChange, LastIndividuallyConfirmedInputList, player.LastReceivedInputFrameId, player.LastUdpReceivedInputFrameId]
|
||||
RenderFrameBuffer *battle.RingBuffer // Indices are STRICTLY consecutive
|
||||
LatestPlayerUpsyncedInputFrameId int32
|
||||
LastAllConfirmedInputFrameId int32
|
||||
@@ -189,6 +189,7 @@ func (pR *Room) AddPlayerIfPossible(pPlayerFromDbInit *Player, session *websocke
|
||||
pPlayerFromDbInit.AckingInputFrameId = -1
|
||||
pPlayerFromDbInit.LastSentInputFrameId = MAGIC_LAST_SENT_INPUT_FRAME_ID_NORMAL_ADDED
|
||||
pPlayerFromDbInit.LastReceivedInputFrameId = MAGIC_LAST_SENT_INPUT_FRAME_ID_NORMAL_ADDED
|
||||
pPlayerFromDbInit.LastUdpReceivedInputFrameId = MAGIC_LAST_SENT_INPUT_FRAME_ID_NORMAL_ADDED
|
||||
pPlayerFromDbInit.BattleState = PlayerBattleStateIns.ADDED_PENDING_BATTLE_COLLIDER_ACK
|
||||
|
||||
pPlayerFromDbInit.ColliderRadius = DEFAULT_PLAYER_RADIUS // Hardcoded
|
||||
@@ -230,6 +231,7 @@ func (pR *Room) ReAddPlayerIfPossible(pTmpPlayerInstance *Player, session *webso
|
||||
pEffectiveInRoomPlayerInstance.AckingFrameId = -1
|
||||
pEffectiveInRoomPlayerInstance.AckingInputFrameId = -1
|
||||
pEffectiveInRoomPlayerInstance.LastSentInputFrameId = MAGIC_LAST_SENT_INPUT_FRAME_ID_READDED
|
||||
// [WARNING] DON'T reset "player.LastReceivedInputFrameId" & "player.LastUdpReceivedInputFrameId" upon reconnection!
|
||||
pEffectiveInRoomPlayerInstance.BattleState = PlayerBattleStateIns.READDED_PENDING_BATTLE_COLLIDER_ACK
|
||||
|
||||
pEffectiveInRoomPlayerInstance.ColliderRadius = DEFAULT_PLAYER_RADIUS // Hardcoded
|
||||
@@ -574,7 +576,7 @@ func (pR *Room) StartBattle() {
|
||||
})
|
||||
}
|
||||
|
||||
func (pR *Room) OnBattleCmdReceived(pReq *pb.WsReq) {
|
||||
func (pR *Room) OnBattleCmdReceived(pReq *pb.WsReq, fromUDP bool) {
|
||||
/*
|
||||
[WARNING] This function "OnBattleCmdReceived" could be called by different ws sessions and thus from different threads!
|
||||
|
||||
@@ -619,7 +621,7 @@ func (pR *Room) OnBattleCmdReceived(pReq *pb.WsReq) {
|
||||
//Logger.Debug(fmt.Sprintf("OnBattleCmdReceived-InputsBufferLock unlocked: roomId=%v, fromPlayerId=%v", pR.Id, playerId))
|
||||
}()
|
||||
|
||||
inputsBufferSnapshot := pR.markConfirmationIfApplicable(inputFrameUpsyncBatch, playerId, player)
|
||||
inputsBufferSnapshot := pR.markConfirmationIfApplicable(inputFrameUpsyncBatch, playerId, player, fromUDP)
|
||||
if nil != inputsBufferSnapshot {
|
||||
pR.downsyncToAllPlayers(inputsBufferSnapshot)
|
||||
} /*else {
|
||||
@@ -815,7 +817,7 @@ func (pR *Room) OnDismissed() {
|
||||
|
||||
pR.RenderFrameId = 0
|
||||
pR.CurDynamicsRenderFrameId = 0
|
||||
pR.NstDelayFrames = 16
|
||||
pR.NstDelayFrames = 24
|
||||
|
||||
serverFps := 60
|
||||
pR.RollbackEstimatedDtMillis = 16.667 // Use fixed-and-low-precision to mitigate the inconsistent floating-point-number issue between Golang and JavaScript
|
||||
@@ -823,6 +825,7 @@ func (pR *Room) OnDismissed() {
|
||||
dilutedServerFps := float64(58.0) // Don't set this value too small, otherwise we might miss force confirmation needs for slow tickers!
|
||||
pR.dilutedRollbackEstimatedDtNanos = int64(float64(pR.RollbackEstimatedDtNanos) * float64(serverFps) / dilutedServerFps)
|
||||
pR.BattleDurationFrames = int32(60 * serverFps)
|
||||
//pR.BattleDurationFrames = int32(20 * serverFps)
|
||||
pR.BattleDurationNanos = int64(pR.BattleDurationFrames) * (pR.RollbackEstimatedDtNanos + 1)
|
||||
pR.InputFrameUpsyncDelayTolerance = battle.ConvertToNoDelayInputFrameId(pR.NstDelayFrames) - 1 // this value should be strictly smaller than (NstDelayFrames >> InputScaleFrames), otherwise "type#1 forceConfirmation" might become a lag avalanche
|
||||
pR.MaxChasingRenderFramesPerUpdate = 9 // Don't set this value too high to avoid exhausting frontend CPU within a single frame, roughly as the "turn-around frames to recover" is empirically OK
|
||||
@@ -977,7 +980,10 @@ func (pR *Room) onPlayerAdded(playerId int32) {
|
||||
if nil == playerPos {
|
||||
panic(fmt.Sprintf("onPlayerAdded error, nil == playerPos, roomId=%v, playerId=%v, roomState=%v, roomEffectivePlayerCount=%v", pR.Id, playerId, pR.State, pR.EffectivePlayerCount))
|
||||
}
|
||||
pR.Players[playerId].VirtualGridX, pR.Players[playerId].VirtualGridY = battle.WorldToVirtualGridPos(playerPos.X, playerPos.Y)
|
||||
pR.Players[playerId].RevivalVirtualGridX, pR.Players[playerId].RevivalVirtualGridY = battle.WorldToVirtualGridPos(playerPos.X, playerPos.Y)
|
||||
pR.Players[playerId].VirtualGridX, pR.Players[playerId].VirtualGridY = pR.Players[playerId].RevivalVirtualGridX, pR.Players[playerId].RevivalVirtualGridY
|
||||
pR.Players[playerId].MaxHp = 100 // Hardcoded for now
|
||||
pR.Players[playerId].Hp = pR.Players[playerId].MaxHp
|
||||
// Hardcoded initial character orientation/facing
|
||||
if 0 == (pR.Players[playerId].JoinIndex % 2) {
|
||||
pR.Players[playerId].DirX = -2
|
||||
@@ -1159,7 +1165,7 @@ func (pR *Room) getOrPrefabInputFrameDownsync(inputFrameId int32) *battle.InputF
|
||||
return currInputFrameDownsync
|
||||
}
|
||||
|
||||
func (pR *Room) markConfirmationIfApplicable(inputFrameUpsyncBatch []*pb.InputFrameUpsync, playerId int32, player *Player) *pb.InputsBufferSnapshot {
|
||||
func (pR *Room) markConfirmationIfApplicable(inputFrameUpsyncBatch []*pb.InputFrameUpsync, playerId int32, player *Player, fromUDP bool) *pb.InputsBufferSnapshot {
|
||||
// [WARNING] This function MUST BE called while "pR.InputsBufferLock" is locked!
|
||||
// Step#1, put the received "inputFrameUpsyncBatch" into "pR.InputsBuffer"
|
||||
for _, inputFrameUpsync := range inputFrameUpsyncBatch {
|
||||
@@ -1170,6 +1176,7 @@ func (pR *Room) markConfirmationIfApplicable(inputFrameUpsyncBatch []*pb.InputFr
|
||||
continue
|
||||
}
|
||||
if clientInputFrameId < player.LastReceivedInputFrameId {
|
||||
// [WARNING] It's important for correctness that we use "player.LastReceivedInputFrameId" instead of "player.LastUdpReceivedInputFrameId" here!
|
||||
Logger.Debug(fmt.Sprintf("Omitting obsolete inputFrameUpsync#2: roomId=%v, playerId=%v, clientInputFrameId=%v, playerLastReceivedInputFrameId=%v, InputsBuffer=%v", pR.Id, playerId, clientInputFrameId, player.LastReceivedInputFrameId, pR.InputsBufferString(false)))
|
||||
continue
|
||||
}
|
||||
@@ -1182,11 +1189,25 @@ func (pR *Room) markConfirmationIfApplicable(inputFrameUpsyncBatch []*pb.InputFr
|
||||
targetInputFrameDownsync.InputList[player.JoinIndex-1] = inputFrameUpsync.Encoded
|
||||
targetInputFrameDownsync.ConfirmedList |= uint64(1 << uint32(player.JoinIndex-1))
|
||||
|
||||
player.LastReceivedInputFrameId = clientInputFrameId
|
||||
pR.LastIndividuallyConfirmedInputList[player.JoinIndex-1] = inputFrameUpsync.Encoded
|
||||
if false == fromUDP {
|
||||
/*
|
||||
[WARNING] We have to distinguish whether or not the incoming batch is from UDP here, otherwise "pR.LatestPlayerUpsyncedInputFrameId - pR.LastAllConfirmedInputFrameId" might become unexpectedly large in case of "UDP packet loss + slow ws session"!
|
||||
|
||||
if clientInputFrameId > pR.LatestPlayerUpsyncedInputFrameId {
|
||||
pR.LatestPlayerUpsyncedInputFrameId = clientInputFrameId
|
||||
Moreover, only ws session upsyncs should advance "player.LastReceivedInputFrameId" & "pR.LatestPlayerUpsyncedInputFrameId".
|
||||
|
||||
Kindly note that the updates of "player.LastReceivedInputFrameId" could be discrete before and after reconnection.
|
||||
*/
|
||||
player.LastReceivedInputFrameId = clientInputFrameId
|
||||
if clientInputFrameId > pR.LatestPlayerUpsyncedInputFrameId {
|
||||
pR.LatestPlayerUpsyncedInputFrameId = clientInputFrameId
|
||||
}
|
||||
}
|
||||
|
||||
if clientInputFrameId > player.LastUdpReceivedInputFrameId {
|
||||
// No need to update "player.LastUdpReceivedInputFrameId" only when "true == fromUDP", we should keep "player.LastUdpReceivedInputFrameId >= player.LastReceivedInputFrameId" at any moment.
|
||||
player.LastUdpReceivedInputFrameId = clientInputFrameId
|
||||
// It's safe (in terms of getting an eventually correct "RenderFrameBuffer") to put the following update of "pR.LastIndividuallyConfirmedInputList" which is ONLY used for prediction in "InputsBuffer" out of "false == fromUDP" block.
|
||||
pR.LastIndividuallyConfirmedInputList[player.JoinIndex-1] = inputFrameUpsync.Encoded
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1253,6 +1274,7 @@ func (pR *Room) forceConfirmationIfApplicable(prevRenderFrameId int32) uint64 {
|
||||
totPlayerCnt := uint32(pR.Capacity)
|
||||
allConfirmedMask := uint64((1 << totPlayerCnt) - 1)
|
||||
unconfirmedMask := uint64(0)
|
||||
// As "pR.LastAllConfirmedInputFrameId" can be advanced by UDP but "pR.LatestPlayerUpsyncedInputFrameId" could only be advanced by ws session, when the following condition is met we know that the slow ticker is really in trouble!
|
||||
if pR.LatestPlayerUpsyncedInputFrameId > (pR.LastAllConfirmedInputFrameId + pR.InputFrameUpsyncDelayTolerance + 1) {
|
||||
// Type#1 check whether there's a significantly slow ticker among players
|
||||
oldLastAllConfirmedInputFrameId := pR.LastAllConfirmedInputFrameId
|
||||
@@ -1730,7 +1752,7 @@ func (pR *Room) startBattleUdpTunnel() {
|
||||
pReq := new(pb.WsReq)
|
||||
bytes := message[0:rlen]
|
||||
if unmarshalErr := proto.Unmarshal(bytes, pReq); nil != unmarshalErr {
|
||||
Logger.Warn("`BattleUdpTunnel` for roomId=%d failed to unmarshal", zap.Error(unmarshalErr))
|
||||
Logger.Warn(fmt.Sprintf("`BattleUdpTunnel` for roomId=%d failed to unmarshal %d bytes", pR.Id, rlen), zap.Error(unmarshalErr))
|
||||
continue
|
||||
}
|
||||
playerId := pReq.PlayerId
|
||||
@@ -1760,7 +1782,7 @@ func (pR *Room) startBattleUdpTunnel() {
|
||||
Logger.Warn(fmt.Sprintf("`BattleUdpTunnel` for roomId=%d failed to forward upsync from (playerId:%d, joinIndex:%d, addr:%s) to (otherPlayerId:%d, otherPlayerJoinIndex:%d, otherPlayerAddr:%s)\n", pR.Id, playerId, peerJoinIndex, remote, otherPlayer.Id, otherPlayer.JoinIndex, otherPlayer.BattleUdpTunnelAddr))
|
||||
}
|
||||
}
|
||||
pR.OnBattleCmdReceived(pReq) // To help advance "pR.LastAllConfirmedInputFrameId" asap
|
||||
pR.OnBattleCmdReceived(pReq, true) // To help advance "pR.LastAllConfirmedInputFrameId" asap, and even if "pR.LastAllConfirmedInputFrameId" is not advanced due to packet loss, these UDP packets would help prefill the "InputsBuffer" with correct player "future inputs (compared to ws session)" such that when "forceConfirmation" occurs we have as many correct predictions as possible
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -26,38 +26,40 @@ type PlayerDownsync struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
VirtualGridX int32 `protobuf:"varint,2,opt,name=virtualGridX,proto3" json:"virtualGridX,omitempty"`
|
||||
VirtualGridY int32 `protobuf:"varint,3,opt,name=virtualGridY,proto3" json:"virtualGridY,omitempty"`
|
||||
DirX int32 `protobuf:"varint,4,opt,name=dirX,proto3" json:"dirX,omitempty"`
|
||||
DirY int32 `protobuf:"varint,5,opt,name=dirY,proto3" json:"dirY,omitempty"`
|
||||
VelX int32 `protobuf:"varint,6,opt,name=velX,proto3" json:"velX,omitempty"`
|
||||
VelY int32 `protobuf:"varint,7,opt,name=velY,proto3" json:"velY,omitempty"` // "velX" and "velY" is used to record the accumulated effect by inertia and accelerations (including gravity)
|
||||
Speed int32 `protobuf:"varint,8,opt,name=speed,proto3" json:"speed,omitempty"` // this is the instantaneous scalar attribute of a character, different from but will be accounted in "velX" and "velY"
|
||||
BattleState int32 `protobuf:"varint,9,opt,name=battleState,proto3" json:"battleState,omitempty"`
|
||||
JoinIndex int32 `protobuf:"varint,10,opt,name=joinIndex,proto3" json:"joinIndex,omitempty"`
|
||||
ColliderRadius int32 `protobuf:"varint,11,opt,name=colliderRadius,proto3" json:"colliderRadius,omitempty"`
|
||||
Removed bool `protobuf:"varint,12,opt,name=removed,proto3" json:"removed,omitempty"`
|
||||
Score int32 `protobuf:"varint,13,opt,name=score,proto3" json:"score,omitempty"`
|
||||
LastMoveGmtMillis int32 `protobuf:"varint,14,opt,name=lastMoveGmtMillis,proto3" json:"lastMoveGmtMillis,omitempty"`
|
||||
FramesToRecover int32 `protobuf:"varint,15,opt,name=framesToRecover,proto3" json:"framesToRecover,omitempty"`
|
||||
Hp int32 `protobuf:"varint,16,opt,name=hp,proto3" json:"hp,omitempty"`
|
||||
MaxHp int32 `protobuf:"varint,17,opt,name=maxHp,proto3" json:"maxHp,omitempty"`
|
||||
CharacterState int32 `protobuf:"varint,18,opt,name=characterState,proto3" json:"characterState,omitempty"`
|
||||
InAir bool `protobuf:"varint,19,opt,name=inAir,proto3" json:"inAir,omitempty"` // by design a standalone field only inferred by the collision result of "applyInputFrameDownsyncDynamicsOnSingleRenderFrame" instead of "characterState", because we need check the transition for "characterState" from this field, i.e. "inAir (prev -> curr)"
|
||||
FramesInChState int32 `protobuf:"varint,20,opt,name=framesInChState,proto3" json:"framesInChState,omitempty"` // number of frames elapsed in the current character state
|
||||
ActiveSkillId int32 `protobuf:"varint,21,opt,name=activeSkillId,proto3" json:"activeSkillId,omitempty"`
|
||||
ActiveSkillHit int32 `protobuf:"varint,22,opt,name=activeSkillHit,proto3" json:"activeSkillHit,omitempty"`
|
||||
FramesInvinsible int32 `protobuf:"varint,23,opt,name=framesInvinsible,proto3" json:"framesInvinsible,omitempty"`
|
||||
BulletTeamId int32 `protobuf:"varint,24,opt,name=bulletTeamId,proto3" json:"bulletTeamId,omitempty"`
|
||||
ChCollisionTeamId int32 `protobuf:"varint,25,opt,name=chCollisionTeamId,proto3" json:"chCollisionTeamId,omitempty"`
|
||||
OnWall bool `protobuf:"varint,26,opt,name=onWall,proto3" json:"onWall,omitempty"` // like "inAir", it’s by design a standalone field only inferred by the collision result of "applyInputFrameDownsyncDynamicsOnSingleRenderFrame" instead of "characterState", because we need check the transition for "characterState" from this field, i.e. "onWall (prev -> curr)"
|
||||
OnWallNormX int32 `protobuf:"varint,27,opt,name=onWallNormX,proto3" json:"onWallNormX,omitempty"`
|
||||
OnWallNormY int32 `protobuf:"varint,28,opt,name=onWallNormY,proto3" json:"onWallNormY,omitempty"`
|
||||
CapturedByInertia bool `protobuf:"varint,29,opt,name=capturedByInertia,proto3" json:"capturedByInertia,omitempty"` // like "inAir", it’s by design a standalone field only inferred by the calc result of "applyInputFrameDownsyncDynamicsOnSingleRenderFrame" instead of "characterState"
|
||||
Name string `protobuf:"bytes,997,opt,name=name,proto3" json:"name,omitempty"`
|
||||
DisplayName string `protobuf:"bytes,998,opt,name=displayName,proto3" json:"displayName,omitempty"`
|
||||
Avatar string `protobuf:"bytes,999,opt,name=avatar,proto3" json:"avatar,omitempty"`
|
||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
VirtualGridX int32 `protobuf:"varint,2,opt,name=virtualGridX,proto3" json:"virtualGridX,omitempty"`
|
||||
VirtualGridY int32 `protobuf:"varint,3,opt,name=virtualGridY,proto3" json:"virtualGridY,omitempty"`
|
||||
DirX int32 `protobuf:"varint,4,opt,name=dirX,proto3" json:"dirX,omitempty"`
|
||||
DirY int32 `protobuf:"varint,5,opt,name=dirY,proto3" json:"dirY,omitempty"`
|
||||
VelX int32 `protobuf:"varint,6,opt,name=velX,proto3" json:"velX,omitempty"`
|
||||
VelY int32 `protobuf:"varint,7,opt,name=velY,proto3" json:"velY,omitempty"` // "velX" and "velY" is used to record the accumulated effect by inertia and accelerations (including gravity)
|
||||
Speed int32 `protobuf:"varint,8,opt,name=speed,proto3" json:"speed,omitempty"` // this is the instantaneous scalar attribute of a character, different from but will be accounted in "velX" and "velY"
|
||||
BattleState int32 `protobuf:"varint,9,opt,name=battleState,proto3" json:"battleState,omitempty"`
|
||||
JoinIndex int32 `protobuf:"varint,10,opt,name=joinIndex,proto3" json:"joinIndex,omitempty"`
|
||||
ColliderRadius int32 `protobuf:"varint,11,opt,name=colliderRadius,proto3" json:"colliderRadius,omitempty"`
|
||||
Removed bool `protobuf:"varint,12,opt,name=removed,proto3" json:"removed,omitempty"`
|
||||
Score int32 `protobuf:"varint,13,opt,name=score,proto3" json:"score,omitempty"`
|
||||
LastMoveGmtMillis int32 `protobuf:"varint,14,opt,name=lastMoveGmtMillis,proto3" json:"lastMoveGmtMillis,omitempty"`
|
||||
FramesToRecover int32 `protobuf:"varint,15,opt,name=framesToRecover,proto3" json:"framesToRecover,omitempty"`
|
||||
Hp int32 `protobuf:"varint,16,opt,name=hp,proto3" json:"hp,omitempty"`
|
||||
MaxHp int32 `protobuf:"varint,17,opt,name=maxHp,proto3" json:"maxHp,omitempty"`
|
||||
CharacterState int32 `protobuf:"varint,18,opt,name=characterState,proto3" json:"characterState,omitempty"`
|
||||
InAir bool `protobuf:"varint,19,opt,name=inAir,proto3" json:"inAir,omitempty"` // by design a standalone field only inferred by the collision result of "applyInputFrameDownsyncDynamicsOnSingleRenderFrame" instead of "characterState", because we need check the transition for "characterState" from this field, i.e. "inAir (prev -> curr)"
|
||||
FramesInChState int32 `protobuf:"varint,20,opt,name=framesInChState,proto3" json:"framesInChState,omitempty"` // number of frames elapsed in the current character state
|
||||
ActiveSkillId int32 `protobuf:"varint,21,opt,name=activeSkillId,proto3" json:"activeSkillId,omitempty"`
|
||||
ActiveSkillHit int32 `protobuf:"varint,22,opt,name=activeSkillHit,proto3" json:"activeSkillHit,omitempty"`
|
||||
FramesInvinsible int32 `protobuf:"varint,23,opt,name=framesInvinsible,proto3" json:"framesInvinsible,omitempty"`
|
||||
BulletTeamId int32 `protobuf:"varint,24,opt,name=bulletTeamId,proto3" json:"bulletTeamId,omitempty"`
|
||||
ChCollisionTeamId int32 `protobuf:"varint,25,opt,name=chCollisionTeamId,proto3" json:"chCollisionTeamId,omitempty"`
|
||||
OnWall bool `protobuf:"varint,26,opt,name=onWall,proto3" json:"onWall,omitempty"` // like "inAir", it’s by design a standalone field only inferred by the collision result of "applyInputFrameDownsyncDynamicsOnSingleRenderFrame" instead of "characterState", because we need check the transition for "characterState" from this field, i.e. "onWall (prev -> curr)"
|
||||
OnWallNormX int32 `protobuf:"varint,27,opt,name=onWallNormX,proto3" json:"onWallNormX,omitempty"`
|
||||
OnWallNormY int32 `protobuf:"varint,28,opt,name=onWallNormY,proto3" json:"onWallNormY,omitempty"`
|
||||
CapturedByInertia bool `protobuf:"varint,29,opt,name=capturedByInertia,proto3" json:"capturedByInertia,omitempty"` // like "inAir", it’s by design a standalone field only inferred by the calc result of "applyInputFrameDownsyncDynamicsOnSingleRenderFrame" instead of "characterState"
|
||||
RevivalVirtualGridX int32 `protobuf:"varint,30,opt,name=revivalVirtualGridX,proto3" json:"revivalVirtualGridX,omitempty"`
|
||||
RevivalVirtualGridY int32 `protobuf:"varint,31,opt,name=revivalVirtualGridY,proto3" json:"revivalVirtualGridY,omitempty"`
|
||||
Name string `protobuf:"bytes,997,opt,name=name,proto3" json:"name,omitempty"`
|
||||
DisplayName string `protobuf:"bytes,998,opt,name=displayName,proto3" json:"displayName,omitempty"`
|
||||
Avatar string `protobuf:"bytes,999,opt,name=avatar,proto3" json:"avatar,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PlayerDownsync) Reset() {
|
||||
@@ -295,6 +297,20 @@ func (x *PlayerDownsync) GetCapturedByInertia() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *PlayerDownsync) GetRevivalVirtualGridX() int32 {
|
||||
if x != nil {
|
||||
return x.RevivalVirtualGridX
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PlayerDownsync) GetRevivalVirtualGridY() int32 {
|
||||
if x != nil {
|
||||
return x.RevivalVirtualGridY
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PlayerDownsync) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
@@ -1782,7 +1798,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, 0xf3, 0x07, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f,
|
||||
0x6f, 0x74, 0x6f, 0x22, 0xd7, 0x08, 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,
|
||||
@@ -1840,319 +1856,325 @@ var file_room_downsync_frame_proto_rawDesc = []byte{
|
||||
0x6e, 0x57, 0x61, 0x6c, 0x6c, 0x4e, 0x6f, 0x72, 0x6d, 0x59, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x61,
|
||||
0x70, 0x74, 0x75, 0x72, 0x65, 0x64, 0x42, 0x79, 0x49, 0x6e, 0x65, 0x72, 0x74, 0x69, 0x61, 0x18,
|
||||
0x1d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x64, 0x42,
|
||||
0x79, 0x49, 0x6e, 0x65, 0x72, 0x74, 0x69, 0x61, 0x12, 0x13, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x18, 0xe5, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a,
|
||||
0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0xe6, 0x07, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x12, 0x17, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0xe7, 0x07, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x6f, 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, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x62, 0x74, 0x6e, 0x42, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x09, 0x62, 0x74, 0x6e, 0x42, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x6e, 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, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 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, 0xd2, 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, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b,
|
||||
0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65,
|
||||
0x79, 0x12, 0x4e, 0x0a, 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55,
|
||||
0x70, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46,
|
||||
0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x15, 0x69, 0x6e, 0x70, 0x75,
|
||||
0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63,
|
||||
0x68, 0x12, 0x27, 0x0a, 0x02, 0x68, 0x62, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74,
|
||||
0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x02, 0x68, 0x62, 0x22, 0x9a, 0x02, 0x0a, 0x14, 0x49,
|
||||
0x6e, 0x70, 0x75, 0x74, 0x73, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73,
|
||||
0x68, 0x6f, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x72,
|
||||
0x65, 0x66, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12,
|
||||
0x28, 0x0a, 0x0f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61,
|
||||
0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x58, 0x0a, 0x19, 0x74, 0x6f, 0x53,
|
||||
0x65, 0x6e, 0x64, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77,
|
||||
0x6e, 0x73, 0x79, 0x6e, 0x63, 0x73, 0x18, 0x03, 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, 0x19, 0x74, 0x6f, 0x53, 0x65, 0x6e, 0x64,
|
||||
0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79,
|
||||
0x6e, 0x63, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72,
|
||||
0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11,
|
||||
0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e,
|
||||
0x63, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x65, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64,
|
||||
0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x70, 0x65, 0x65, 0x72, 0x4a, 0x6f,
|
||||
0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x89, 0x07, 0x0a, 0x0b, 0x4d, 0x65, 0x6c, 0x65,
|
||||
0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x17, 0x6f, 0x72, 0x69, 0x67, 0x69,
|
||||
0x6e, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65,
|
||||
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e,
|
||||
0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49,
|
||||
0x64, 0x12, 0x2c, 0x0a, 0x11, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4a, 0x6f, 0x69,
|
||||
0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6f, 0x66,
|
||||
0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12,
|
||||
0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x46,
|
||||
0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x45, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x64,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46,
|
||||
0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x61, 0x63, 0x74,
|
||||
0x69, 0x76, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69, 0x74,
|
||||
0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x0d, 0x68, 0x69, 0x74, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12,
|
||||
0x28, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d,
|
||||
0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53,
|
||||
0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x75, 0x73,
|
||||
0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0c, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x12, 0x22, 0x0a,
|
||||
0x0c, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x59, 0x18, 0x0a, 0x20,
|
||||
0x79, 0x49, 0x6e, 0x65, 0x72, 0x74, 0x69, 0x61, 0x12, 0x30, 0x0a, 0x13, 0x72, 0x65, 0x76, 0x69,
|
||||
0x76, 0x61, 0x6c, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x58, 0x18,
|
||||
0x1e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x72, 0x65, 0x76, 0x69, 0x76, 0x61, 0x6c, 0x56, 0x69,
|
||||
0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x58, 0x12, 0x30, 0x0a, 0x13, 0x72, 0x65,
|
||||
0x76, 0x69, 0x76, 0x61, 0x6c, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64,
|
||||
0x59, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x72, 0x65, 0x76, 0x69, 0x76, 0x61, 0x6c,
|
||||
0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x59, 0x12, 0x13, 0x0a, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0xe5, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x21, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x18, 0xe6, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0xe7,
|
||||
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x6f, 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,
|
||||
0x12, 0x1c, 0x0a, 0x09, 0x62, 0x74, 0x6e, 0x42, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x09, 0x62, 0x74, 0x6e, 0x42, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x6e,
|
||||
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,
|
||||
0x12, 0x1c, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 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, 0xd2, 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, 0x18, 0x0a, 0x07, 0x61,
|
||||
0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x61, 0x75,
|
||||
0x74, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x4e, 0x0a, 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72,
|
||||
0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e,
|
||||
0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x15,
|
||||
0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63,
|
||||
0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x27, 0x0a, 0x02, 0x68, 0x62, 0x18, 0x09, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74,
|
||||
0x62, 0x65, 0x61, 0x74, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x02, 0x68, 0x62, 0x22, 0x9a,
|
||||
0x02, 0x0a, 0x14, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53,
|
||||
0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x52, 0x65,
|
||||
0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x10, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d,
|
||||
0x65, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d,
|
||||
0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x75, 0x6e,
|
||||
0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x58, 0x0a,
|
||||
0x19, 0x74, 0x6f, 0x53, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d,
|
||||
0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x73, 0x18, 0x03, 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, 0x19, 0x74, 0x6f,
|
||||
0x53, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f,
|
||||
0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c,
|
||||
0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52,
|
||||
0x65, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x65, 0x65, 0x72, 0x4a, 0x6f, 0x69,
|
||||
0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x70, 0x65,
|
||||
0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x89, 0x07, 0x0a, 0x0b,
|
||||
0x4d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x17, 0x6f,
|
||||
0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46,
|
||||
0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x6f, 0x72,
|
||||
0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72,
|
||||
0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65,
|
||||
0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x11, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e,
|
||||
0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x46, 0x72,
|
||||
0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72,
|
||||
0x74, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x61, 0x6e,
|
||||
0x63, 0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x62,
|
||||
0x6c, 0x65, 0x53, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x61, 0x6e,
|
||||
0x63, 0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x62,
|
||||
0x6c, 0x65, 0x45, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x74,
|
||||
0x69, 0x76, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x24, 0x0a,
|
||||
0x0d, 0x68, 0x69, 0x74, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x69, 0x74, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61,
|
||||
0x6d, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x75, 0x6e,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x62, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x22, 0x0a,
|
||||
0x0c, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x18, 0x09, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x0c, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c,
|
||||
0x59, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x6c,
|
||||
0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0c, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x12, 0x22, 0x0a,
|
||||
0x0c, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x59, 0x18, 0x0d, 0x20,
|
||||
0x58, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c,
|
||||
0x59, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63,
|
||||
0x6b, 0x56, 0x65, 0x6c, 0x59, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x18,
|
||||
0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a,
|
||||
0x0c, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x18, 0x0c, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x0c, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c,
|
||||
0x59, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65,
|
||||
0x74, 0x58, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78,
|
||||
0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x58, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69, 0x74, 0x62, 0x6f,
|
||||
0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d,
|
||||
0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x12, 0x20, 0x0a,
|
||||
0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x58, 0x18, 0x10, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x58, 0x12,
|
||||
0x20, 0x0a, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x59, 0x18, 0x11,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65,
|
||||
0x59, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x18, 0x12, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61,
|
||||
0x6d, 0x49, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49,
|
||||
0x64, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c,
|
||||
0x49, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74,
|
||||
0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x70, 0x65, 0x63, 0x69,
|
||||
0x65, 0x73, 0x49, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x70, 0x65, 0x63,
|
||||
0x69, 0x65, 0x73, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f,
|
||||
0x65, 0x78, 0x70, 0x6c, 0x6f, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x62, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x07, 0x62, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x72, 0x61,
|
||||
0x6d, 0x65, 0x73, 0x49, 0x6e, 0x42, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x18, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x49, 0x6e, 0x42, 0x6c, 0x53, 0x74,
|
||||
0x61, 0x74, 0x65, 0x22, 0xc1, 0x08, 0x0a, 0x0e, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x6c,
|
||||
0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x17, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e,
|
||||
0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61,
|
||||
0x74, 0x65, 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64,
|
||||
0x12, 0x2c, 0x0a, 0x11, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e,
|
||||
0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6f, 0x66, 0x66,
|
||||
0x65, 0x6e, 0x64, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24,
|
||||
0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x46, 0x72,
|
||||
0x61, 0x6d, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x53, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x46,
|
||||
0x72, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x45, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x64, 0x46,
|
||||
0x72, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x72,
|
||||
0x61, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69,
|
||||
0x76, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69, 0x74, 0x53,
|
||||
0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0d, 0x68, 0x69, 0x74, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x28,
|
||||
0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65,
|
||||
0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74,
|
||||
0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x75, 0x73, 0x68,
|
||||
0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c,
|
||||
0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x12, 0x22, 0x0a, 0x0c,
|
||||
0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x59, 0x18, 0x0a, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0c, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x59,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x6c, 0x66,
|
||||
0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c,
|
||||
0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x12, 0x22, 0x0a, 0x0c,
|
||||
0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x59, 0x18, 0x0d, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0c, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x59,
|
||||
0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74,
|
||||
0x58, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f,
|
||||
0x66, 0x66, 0x73, 0x65, 0x74, 0x58, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78,
|
||||
0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68,
|
||||
0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x12, 0x20, 0x0a, 0x0b,
|
||||
0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x58, 0x18, 0x10, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x58, 0x12, 0x20,
|
||||
0x0a, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x59, 0x18, 0x11, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x59,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x06, 0x62, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d,
|
||||
0x49, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64,
|
||||
0x12, 0x24, 0x0a, 0x0d, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49,
|
||||
0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c,
|
||||
0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65,
|
||||
0x73, 0x49, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x70, 0x65, 0x63, 0x69,
|
||||
0x65, 0x73, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x65,
|
||||
0x78, 0x70, 0x6c, 0x6f, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x62, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x07, 0x62, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x72, 0x61, 0x6d,
|
||||
0x65, 0x73, 0x49, 0x6e, 0x42, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x0f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x49, 0x6e, 0x42, 0x6c, 0x53, 0x74, 0x61,
|
||||
0x74, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69,
|
||||
0x64, 0x58, 0x18, 0xe7, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75,
|
||||
0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x58, 0x12, 0x23, 0x0a, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75,
|
||||
0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x59, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c,
|
||||
0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x59, 0x12, 0x13, 0x0a, 0x04,
|
||||
0x64, 0x69, 0x72, 0x58, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x64, 0x69, 0x72,
|
||||
0x58, 0x12, 0x13, 0x0a, 0x04, 0x64, 0x69, 0x72, 0x59, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x04, 0x64, 0x69, 0x72, 0x59, 0x12, 0x13, 0x0a, 0x04, 0x76, 0x65, 0x6c, 0x58, 0x18, 0xeb,
|
||||
0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x76, 0x65, 0x6c, 0x58, 0x12, 0x13, 0x0a, 0x04, 0x76,
|
||||
0x65, 0x6c, 0x59, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x76, 0x65, 0x6c, 0x59,
|
||||
0x12, 0x15, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0xed, 0x07, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x22, 0x71, 0x0a, 0x0f, 0x48, 0x6f, 0x6c, 0x65, 0x50,
|
||||
0x75, 0x6e, 0x63, 0x68, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e,
|
||||
0x74, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0c, 0x69, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20,
|
||||
0x0a, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20,
|
||||
0x58, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c,
|
||||
0x59, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63,
|
||||
0x6b, 0x56, 0x65, 0x6c, 0x59, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f,
|
||||
0x66, 0x66, 0x73, 0x65, 0x74, 0x58, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x69,
|
||||
0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x58, 0x12, 0x24, 0x0a, 0x0d, 0x68,
|
||||
0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x18, 0x0f, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0d, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74,
|
||||
0x59, 0x12, 0x20, 0x0a, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x58,
|
||||
0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69,
|
||||
0x7a, 0x65, 0x58, 0x12, 0x20, 0x0a, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a,
|
||||
0x65, 0x59, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78,
|
||||
0x53, 0x69, 0x7a, 0x65, 0x59, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x18,
|
||||
0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74,
|
||||
0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c,
|
||||
0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x62, 0x75,
|
||||
0x6c, 0x6c, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73,
|
||||
0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
|
||||
0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x78, 0x70,
|
||||
0x6c, 0x6f, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x16, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0f, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x61,
|
||||
0x6d, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x17,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x62, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a,
|
||||
0x0f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x49, 0x6e, 0x42, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65,
|
||||
0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x49, 0x6e,
|
||||
0x42, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xc1, 0x08, 0x0a, 0x0e, 0x46, 0x69, 0x72, 0x65,
|
||||
0x62, 0x61, 0x6c, 0x6c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x17, 0x6f, 0x72,
|
||||
0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72,
|
||||
0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x6f, 0x72, 0x69,
|
||||
0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61,
|
||||
0x6d, 0x65, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72,
|
||||
0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x11, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64,
|
||||
0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x46, 0x72, 0x61,
|
||||
0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74,
|
||||
0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x63,
|
||||
0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x53, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x63,
|
||||
0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x45, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x74, 0x69,
|
||||
0x76, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c,
|
||||
0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d,
|
||||
0x68, 0x69, 0x74, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x69, 0x74, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d,
|
||||
0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x75, 0x6e, 0x46,
|
||||
0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x62, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c,
|
||||
0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x18, 0x09, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0c, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58,
|
||||
0x12, 0x22, 0x0a, 0x0c, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x59,
|
||||
0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b,
|
||||
0x56, 0x65, 0x6c, 0x59, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0b,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0c,
|
||||
0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x18, 0x0c, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0c, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58,
|
||||
0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x59,
|
||||
0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b,
|
||||
0x56, 0x65, 0x6c, 0x59, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66,
|
||||
0x66, 0x73, 0x65, 0x74, 0x58, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x69, 0x74,
|
||||
0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x58, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69,
|
||||
0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x18, 0x0f, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x0d, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59,
|
||||
0x12, 0x20, 0x0a, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x58, 0x18,
|
||||
0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a,
|
||||
0x65, 0x58, 0x12, 0x20, 0x0a, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65,
|
||||
0x59, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53,
|
||||
0x69, 0x7a, 0x65, 0x59, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x18, 0x12,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x65,
|
||||
0x61, 0x6d, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c, 0x6f,
|
||||
0x63, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x62, 0x75, 0x6c,
|
||||
0x6c, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x70,
|
||||
0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73,
|
||||
0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x6c,
|
||||
0x6f, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x0f, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x61, 0x6d,
|
||||
0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x17, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x07, 0x62, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x0f,
|
||||
0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x49, 0x6e, 0x42, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18,
|
||||
0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x49, 0x6e, 0x42,
|
||||
0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61,
|
||||
0x6c, 0x47, 0x72, 0x69, 0x64, 0x58, 0x18, 0xe7, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x76,
|
||||
0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x58, 0x12, 0x23, 0x0a, 0x0c, 0x76,
|
||||
0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x59, 0x18, 0xe8, 0x07, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x59,
|
||||
0x12, 0x13, 0x0a, 0x04, 0x64, 0x69, 0x72, 0x58, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x04, 0x64, 0x69, 0x72, 0x58, 0x12, 0x13, 0x0a, 0x04, 0x64, 0x69, 0x72, 0x59, 0x18, 0xea, 0x07,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x64, 0x69, 0x72, 0x59, 0x12, 0x13, 0x0a, 0x04, 0x76, 0x65,
|
||||
0x6c, 0x58, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x76, 0x65, 0x6c, 0x58, 0x12,
|
||||
0x13, 0x0a, 0x04, 0x76, 0x65, 0x6c, 0x59, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
|
||||
0x76, 0x65, 0x6c, 0x59, 0x12, 0x15, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0xed, 0x07,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x22, 0x71, 0x0a, 0x0f, 0x48,
|
||||
0x6f, 0x6c, 0x65, 0x50, 0x75, 0x6e, 0x63, 0x68, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x22,
|
||||
0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b,
|
||||
0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f,
|
||||
0x6f, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x22, 0x4b,
|
||||
0x0a, 0x0b, 0x50, 0x65, 0x65, 0x72, 0x55, 0x64, 0x70, 0x41, 0x64, 0x64, 0x72, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72,
|
||||
0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x22, 0xb6, 0x06, 0x0a, 0x12,
|
||||
0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x50, 0x69,
|
||||
0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76,
|
||||
0x61, 0x6c, 0x54, 0x6f, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x0a, 0x15, 0x77, 0x69, 0x6c, 0x6c,
|
||||
0x4b, 0x69, 0x63, 0x6b, 0x49, 0x66, 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f,
|
||||
0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x77, 0x69, 0x6c, 0x6c, 0x4b, 0x69, 0x63,
|
||||
0x6b, 0x49, 0x66, 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x12, 0x20,
|
||||
0x0a, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x22, 0x4b, 0x0a, 0x0b, 0x50, 0x65,
|
||||
0x65, 0x72, 0x55, 0x64, 0x70, 0x41, 0x64, 0x64, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72,
|
||||
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
|
||||
0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x22, 0xb6, 0x06, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x74,
|
||||
0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c,
|
||||
0x0a, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e,
|
||||
0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x50, 0x69, 0x6e, 0x67, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f,
|
||||
0x50, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x0a, 0x15, 0x77, 0x69, 0x6c, 0x6c, 0x4b, 0x69, 0x63, 0x6b,
|
||||
0x49, 0x66, 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x15, 0x77, 0x69, 0x6c, 0x6c, 0x4b, 0x69, 0x63, 0x6b, 0x49, 0x66, 0x49,
|
||||
0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6f,
|
||||
0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x13,
|
||||
0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61,
|
||||
0x6e, 0x6f, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x62, 0x61, 0x74, 0x74, 0x6c,
|
||||
0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x46,
|
||||
0x0a, 0x1e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79,
|
||||
0x6e, 0x63, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x54, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65,
|
||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61,
|
||||
0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x54, 0x6f, 0x6c,
|
||||
0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x1f, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x61,
|
||||
0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x50, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x1f, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6e, 0x64, 0x65,
|
||||
0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x12, 0x3c, 0x0a, 0x19, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, 0x69,
|
||||
0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x18, 0x08, 0x20,
|
||||
0x01, 0x28, 0x01, 0x52, 0x19, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74,
|
||||
0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, 0x3a,
|
||||
0x0a, 0x18, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61,
|
||||
0x74, 0x65, 0x64, 0x44, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x18, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61,
|
||||
0x74, 0x65, 0x64, 0x44, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65,
|
||||
0x6e, 0x64, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x0a, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65,
|
||||
0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x66, 0x66,
|
||||
0x73, 0x65, 0x74, 0x58, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x58, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x12, 0x2a, 0x0a, 0x10,
|
||||
0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x53, 0x74, 0x65, 0x70,
|
||||
0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x4d, 0x69, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x12, 0x2c, 0x0a, 0x11, 0x62, 0x6f, 0x75, 0x6e,
|
||||
0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x11, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x43, 0x61,
|
||||
0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x0f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65,
|
||||
0x55, 0x64, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x55, 0x64, 0x70,
|
||||
0x41, 0x64, 0x64, 0x72, 0x52, 0x0f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x55, 0x64, 0x70, 0x54,
|
||||
0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x39, 0x0a, 0x17, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61,
|
||||
0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x18, 0x80, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61,
|
||||
0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x22, 0x82, 0x04, 0x0a, 0x11, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e,
|
||||
0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72,
|
||||
0x73, 0x41, 0x72, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79,
|
||||
0x6e, 0x63, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x41, 0x72, 0x72, 0x12, 0x26,
|
||||
0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77,
|
||||
0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42,
|
||||
0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65,
|
||||
0x74, 0x52, 0x0c, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x12,
|
||||
0x40, 0x0a, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x6c, 0x42, 0x75, 0x6c, 0x6c, 0x65,
|
||||
0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x73, 0x2e, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x6c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74,
|
||||
0x52, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x6c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74,
|
||||
0x73, 0x12, 0x37, 0x0a, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x18, 0x80, 0x08, 0x20, 0x01,
|
||||
0x28, 0x04, 0x52, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x2d, 0x0a, 0x11, 0x73, 0x68,
|
||||
0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x18,
|
||||
0x81, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f,
|
||||
0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x25, 0x0a, 0x0d, 0x73, 0x70, 0x65,
|
||||
0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x82, 0x08, 0x20, 0x03, 0x28,
|
||||
0x05, 0x52, 0x0d, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x12, 0x33, 0x0a, 0x14, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49,
|
||||
0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x83, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x14, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x43, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0f, 0x70, 0x65, 0x65, 0x72, 0x55, 0x64, 0x70,
|
||||
0x41, 0x64, 0x64, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x84, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x55, 0x64, 0x70,
|
||||
0x41, 0x64, 0x64, 0x72, 0x52, 0x0f, 0x70, 0x65, 0x65, 0x72, 0x55, 0x64, 0x70, 0x41, 0x64, 0x64,
|
||||
0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xaf, 0x02, 0x0a, 0x06, 0x57, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72,
|
||||
0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x63, 0x68, 0x6f, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x49,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x65, 0x63, 0x68, 0x6f, 0x65, 0x64, 0x4d,
|
||||
0x73, 0x67, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x03, 0x61, 0x63, 0x74, 0x12, 0x2b, 0x0a, 0x03, 0x72, 0x64, 0x66, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x6f, 0x6f,
|
||||
0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x03,
|
||||
0x72, 0x64, 0x66, 0x12, 0x54, 0x0a, 0x17, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d,
|
||||
0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e,
|
||||
0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63,
|
||||
0x52, 0x17, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e,
|
||||
0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x63, 0x69,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69,
|
||||
0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x62, 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x65, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64,
|
||||
0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x70, 0x65, 0x65, 0x72, 0x4a, 0x6f,
|
||||
0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x13, 0x5a, 0x11, 0x62, 0x61, 0x74, 0x74, 0x6c,
|
||||
0x65, 0x5f, 0x73, 0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
0x12, 0x30, 0x0a, 0x13, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x62,
|
||||
0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6e,
|
||||
0x6f, 0x73, 0x12, 0x46, 0x0a, 0x1e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65,
|
||||
0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x54, 0x6f, 0x6c, 0x65, 0x72,
|
||||
0x61, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1e, 0x69, 0x6e, 0x70, 0x75,
|
||||
0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x6c, 0x61,
|
||||
0x79, 0x54, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x1f, 0x6d, 0x61,
|
||||
0x78, 0x43, 0x68, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72,
|
||||
0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x1f, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x52,
|
||||
0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x19, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b,
|
||||
0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69,
|
||||
0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x19, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63,
|
||||
0x6b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4d, 0x69, 0x6c, 0x6c,
|
||||
0x69, 0x73, 0x12, 0x3a, 0x0a, 0x18, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73,
|
||||
0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x09,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73,
|
||||
0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x28,
|
||||
0x0a, 0x0f, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a,
|
||||
0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43,
|
||||
0x61, 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x58, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x58, 0x12, 0x22, 0x0a, 0x0c,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x18, 0x0c, 0x20, 0x01,
|
||||
0x28, 0x01, 0x52, 0x0c, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59,
|
||||
0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e,
|
||||
0x53, 0x74, 0x65, 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c,
|
||||
0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x12, 0x2c, 0x0a, 0x11,
|
||||
0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74,
|
||||
0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f,
|
||||
0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x0f, 0x62, 0x61,
|
||||
0x74, 0x74, 0x6c, 0x65, 0x55, 0x64, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x0f, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x65, 0x65,
|
||||
0x72, 0x55, 0x64, 0x70, 0x41, 0x64, 0x64, 0x72, 0x52, 0x0f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65,
|
||||
0x55, 0x64, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x39, 0x0a, 0x17, 0x66, 0x72, 0x61,
|
||||
0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x64, 0x18, 0x80, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x66, 0x72, 0x61,
|
||||
0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x64, 0x22, 0x82, 0x04, 0x0a, 0x11, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77,
|
||||
0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x6c,
|
||||
0x61, 0x79, 0x65, 0x72, 0x73, 0x41, 0x72, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f,
|
||||
0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x41,
|
||||
0x72, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e,
|
||||
0x61, 0x6e, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x6d, 0x65,
|
||||
0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x6c, 0x65, 0x65, 0x42,
|
||||
0x75, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x0c, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c,
|
||||
0x65, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x6c, 0x42,
|
||||
0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x6c, 0x42, 0x75,
|
||||
0x6c, 0x6c, 0x65, 0x74, 0x52, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x6c, 0x42, 0x75,
|
||||
0x6c, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64,
|
||||
0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x18,
|
||||
0x80, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x55,
|
||||
0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x2d,
|
||||
0x0a, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73,
|
||||
0x79, 0x6e, 0x63, 0x18, 0x81, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x73, 0x68, 0x6f, 0x75,
|
||||
0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x25, 0x0a,
|
||||
0x0d, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x82,
|
||||
0x08, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x14, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c, 0x6f,
|
||||
0x63, 0x61, 0x6c, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x83, 0x08, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x14, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c,
|
||||
0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0f, 0x70, 0x65, 0x65,
|
||||
0x72, 0x55, 0x64, 0x70, 0x41, 0x64, 0x64, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x84, 0x08, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x65, 0x65,
|
||||
0x72, 0x55, 0x64, 0x70, 0x41, 0x64, 0x64, 0x72, 0x52, 0x0f, 0x70, 0x65, 0x65, 0x72, 0x55, 0x64,
|
||||
0x70, 0x41, 0x64, 0x64, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xaf, 0x02, 0x0a, 0x06, 0x57, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x03, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x63, 0x68, 0x6f, 0x65, 0x64,
|
||||
0x4d, 0x73, 0x67, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x65, 0x63, 0x68,
|
||||
0x6f, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x63, 0x74, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x63, 0x74, 0x12, 0x2b, 0x0a, 0x03, 0x72, 0x64,
|
||||
0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73,
|
||||
0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61,
|
||||
0x6d, 0x65, 0x52, 0x03, 0x72, 0x64, 0x66, 0x12, 0x54, 0x0a, 0x17, 0x69, 0x6e, 0x70, 0x75, 0x74,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74,
|
||||
0x63, 0x68, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e,
|
||||
0x73, 0x79, 0x6e, 0x63, 0x52, 0x17, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65,
|
||||
0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x36, 0x0a,
|
||||
0x08, 0x62, 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43,
|
||||
0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x62, 0x63, 0x69,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x65, 0x65, 0x72, 0x4a, 0x6f, 0x69,
|
||||
0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x70, 0x65,
|
||||
0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x13, 0x5a, 0x11, 0x62,
|
||||
0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x73, 0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@@ -388,7 +388,7 @@ func Serve(c *gin.Context) {
|
||||
startOrFeedHeartbeatWatchdog(conn)
|
||||
case models.UPSYNC_MSG_ACT_PLAYER_CMD:
|
||||
startOrFeedHeartbeatWatchdog(conn)
|
||||
pRoom.OnBattleCmdReceived(pReq)
|
||||
pRoom.OnBattleCmdReceived(pReq, false)
|
||||
case models.UPSYNC_MSG_ACT_PLAYER_COLLIDER_ACK:
|
||||
res := pRoom.OnPlayerBattleColliderAcked(int32(playerId))
|
||||
if false == res {
|
||||
|
BIN
charts/Merged_cut_annotated_spedup.gif
Normal file
After Width: | Height: | Size: 7.4 MiB |
Before Width: | Height: | Size: 6.7 MiB |
Before Width: | Height: | Size: 3.7 MiB |
@@ -3,7 +3,7 @@
|
||||
"_name": "Fireball1Explosion",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.26666666666666666,
|
||||
"_duration": 0.5,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
@@ -30,19 +30,19 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "8b566f26-b34d-4da6-bdaa-078358a5b685"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"frame": 0.31666666666666665,
|
||||
"value": {
|
||||
"__uuid__": "6ec5f75d-307e-4292-b667-cbbb5a52c2f6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"frame": 0.48333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "d89977f1-d927-4a08-9591-9feb1daf68c8"
|
||||
}
|
||||
|
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Fireball2Explosion",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "a1979f05-3ecc-4d70-9ea9-7822e35602c3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "850884ca-2e6a-4d04-94d9-fd929ac33942"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "88b9c254-1fd8-451f-902e-4a43a7ef5d51"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "566342a3-cfde-44c9-afbe-7d9469653ccb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "d1620a98-de62-4069-8910-122f361d22a4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "2e9ed070-e592-4e77-8fa1-c5250deb006b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "a3e8357d-39da-42e8-b26b-f5ae7a68aed7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "3f3cb45c-732d-4bea-89b4-5495fb0d2c37"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.38333333333333336,
|
||||
"value": {
|
||||
"__uuid__": "d7aeb01a-4e04-4037-a2c4-ba72f45f69f3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.43333333333333335,
|
||||
"value": {
|
||||
"__uuid__": "fe4a97a0-1207-4b81-a541-c2da0bf0a6f3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.48333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "97014ab9-8bdd-4b71-9f61-0639327f9159"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "14b92f5c-af81-416a-a162-e5822d20fe68",
|
||||
"subMetas": {}
|
||||
}
|
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Fireball3Explosion",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "0e003318-f8c2-40f7-b144-140b5ca1e46a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "9c2b0cc2-9a52-4052-b796-cd6c6bd940d4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "76fe0c09-d2d6-432d-bacb-20d297eb4966"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "0735a7ff-0e50-472a-b0f9-8e2cc97be7e7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "993199a8-54a9-40d1-8d2f-12bf16af934c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.35,
|
||||
"value": {
|
||||
"__uuid__": "5d8d9ffc-b4d6-4518-9946-953929ec055c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.38333333333333336,
|
||||
"value": {
|
||||
"__uuid__": "6501ae08-b0ff-43ad-b5c5-cb6dc67f989d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "616cfa00-1dba-4a71-8141-36774933b6a9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.45,
|
||||
"value": {
|
||||
"__uuid__": "4b296e86-2e96-4276-b6de-6a6b22530344"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.48333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "f9cc8e37-c9c2-4f20-9d7e-4533c4e859fe"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "0dbb90ed-a08a-448c-b06e-4831260e9213",
|
||||
"subMetas": {}
|
||||
}
|
97
frontend/assets/resources/animation/Fireball/Fireball2.anim
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Fireball2",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.21666666666666667,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 2,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "db4c7e6f-9bee-4e7a-8628-d41b8bcaff42"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.016666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "42796576-72b3-49c2-8c5a-ea946fbe1525"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "0aa5a52f-a92a-4a4a-b49b-aee2b5a3eb55"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "0a7b5e41-acdc-4af3-beff-0a42aca9f91a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "de0b22b7-65ca-455f-bcd1-2ddd6cc114e2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "e9ce1383-9e3d-4d44-9f80-ab5fa2224138"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.1,
|
||||
"value": {
|
||||
"__uuid__": "5b22df7e-414b-44a3-989f-640c5b9417b9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "f459615c-70a4-421b-b649-a28460332364"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "c2723b9d-fbd8-4524-a0dd-b110451e4e32"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "4286b3d1-fea2-41fd-8829-7635f546def4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "4e0d6419-62df-4382-893e-dd7cc47f7770"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "f0cd9259-b323-4fba-ad8b-02d5e56c2cd4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "0193b66d-06bb-49f9-b2f5-51fff8b16015"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "d2c65ac4-a5b3-411e-8d2d-18d3980649d7",
|
||||
"subMetas": {}
|
||||
}
|
73
frontend/assets/resources/animation/Fireball/Fireball3.anim
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Fireball3",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5666666666666667,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 2,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "6af65d40-470c-47de-8b3d-f53c3923bf90"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "ebf64819-79a5-4366-bf70-08f3b1c6114c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "e03d879b-5227-4c11-a4b9-0a426967d28a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "a1aa0c83-4a34-43ae-9a8f-56189808df68"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "3cc28dd0-2518-4162-a39d-4e4b19f9d60b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.35,
|
||||
"value": {
|
||||
"__uuid__": "1b41f500-c55b-4cbf-a040-287b6cc0e958"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.43333333333333335,
|
||||
"value": {
|
||||
"__uuid__": "cfa24c51-0ad4-4e3b-b571-c5500002d6e9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5,
|
||||
"value": {
|
||||
"__uuid__": "d4a46a6a-401c-4694-a192-0a7b3ce6f603"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.55,
|
||||
"value": {
|
||||
"__uuid__": "c88c5293-9f21-4a1a-a6b6-649e403dc7a2"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "6aef5812-d16c-4da1-96a3-a38ac227c823",
|
||||
"subMetas": {}
|
||||
}
|
73
frontend/assets/resources/animation/KnifeGirl/Atk4.anim
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Atk4",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 1.0166666666666666,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "da597a30-22da-4053-b4ee-1cfa27980a75"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "b3604b4c-426f-4843-bb76-f09a9687950d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "24b51487-6c91-42d9-bd12-afbbf70f2e4b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "c318ad71-7a5e-43b0-8098-b7a34a6e6fbe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.38333333333333336,
|
||||
"value": {
|
||||
"__uuid__": "85d6d8d7-81cf-4369-a501-6ad72d70f5a2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5,
|
||||
"value": {
|
||||
"__uuid__": "42b76eaf-db36-4835-9072-893337c83425"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.6,
|
||||
"value": {
|
||||
"__uuid__": "152f23a1-f70f-4db6-bb28-68625aef930f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.8833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "9c907eb5-84ab-4fa9-9404-9085f29706cc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 1,
|
||||
"value": {
|
||||
"__uuid__": "74f0ffc8-cc25-4fcf-a6d8-bf093daba9ca"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "2aef91f9-ef47-4bb4-bf43-5441723aa639",
|
||||
"subMetas": {}
|
||||
}
|
103
frontend/assets/resources/animation/KnifeGirl/Dying.anim
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Dying",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5333333333333333,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "700f93f9-ef84-4cb2-b759-f39ceac1c1d1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.016666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "5b4ea047-594e-4d0b-8e08-e24117bf1e67"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "a822576c-d2eb-4c17-8969-03dd1da5a93e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.1,
|
||||
"value": {
|
||||
"__uuid__": "85e92afc-4359-4a8d-bdfa-958a6134cd6a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "88d6e560-1b65-4d78-949c-cbc0e67d33cc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "9ac16319-c1af-41d1-910b-99cbfd6230b2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "2a6b168a-458f-4d19-a985-9b00cc6e37e8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "f8482295-dc0d-4265-be56-0b0a9f6f6b9b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.31666666666666665,
|
||||
"value": {
|
||||
"__uuid__": "0d4a314c-119a-46b9-8dce-dbaacf2523e5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.36666666666666664,
|
||||
"value": {
|
||||
"__uuid__": "18d4ff6c-6b57-461b-8588-03521fafc9d1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4,
|
||||
"value": {
|
||||
"__uuid__": "f25280f2-442a-4ad7-914e-0f96cbf108f5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.45,
|
||||
"value": {
|
||||
"__uuid__": "ccccb669-d44d-4a5c-89a1-9aba9476ce12"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.48333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "4a45c23d-7bc8-4c5e-b761-ac1100b12a09"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "1c4359c5-b303-403d-82ad-8d5e6ae6ec99"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "ac90c9b8-3b06-4866-89ce-2c953a9d5a9a",
|
||||
"subMetas": {}
|
||||
}
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 175 KiB |
61
frontend/assets/resources/animation/Monk/Dashing.anim
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Dashing",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.18333333333333332,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "ec69a078-4153-49e1-9450-656942c2a567"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.016666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "bbf23710-9dc6-4bbb-9565-df8848819d07"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "cc7b4103-1d6b-44c1-8e0c-ee1c49052837"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "90409bfe-7b6c-4eab-953b-ea630585fad4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "9614dc2a-9bfe-4b85-9aa6-d7d62feec82b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "c326e3c0-140f-457b-a086-fe95c025d576"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "8e2d7c5b-452d-44db-b0b4-8ee03b36e7f2"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "337d57ad-118c-40e2-be90-2aa1505c152b",
|
||||
"subMetas": {}
|
||||
}
|
115
frontend/assets/resources/animation/Monk/Dying.anim
Normal file
@@ -0,0 +1,115 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Dying",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5333333333333333,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "6d1cd049-7a44-4dcb-9018-4f0fbbf3fdf8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "50245b04-bcb1-4488-951c-49944c1037da"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "7a6721bb-2321-4947-832f-9a317565ea88"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "c3553a29-e04a-42e2-8b46-82aa85706e26"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "e221838e-740f-45b1-8fd5-80d4ab8563c3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "37ebbd1d-9a18-4514-8331-1358a59cab83"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "b4a9ee91-4315-4fb9-9900-6d763406c81d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "e5388e53-5268-4f54-9a93-f6506db5b77b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3,
|
||||
"value": {
|
||||
"__uuid__": "078814c3-90e2-4b17-a90b-d2046df9a351"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "c605bf48-9cc5-41f1-8ace-a273298f7b21"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.38333333333333336,
|
||||
"value": {
|
||||
"__uuid__": "5b5083ca-8fca-4827-9b76-eaa08685b031"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "b454af6f-9e07-4b34-952b-eca69dc13d5e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.45,
|
||||
"value": {
|
||||
"__uuid__": "af921d09-a72e-4b48-8585-ba72377ba410"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.48333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "733d339e-ed74-49ab-8955-641d21528fcc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5,
|
||||
"value": {
|
||||
"__uuid__": "b7335bea-2985-4331-92c2-08c4c2a5ec86"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "0ae606ea-93c0-4815-9e24-62c5fb59decc"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
5
frontend/assets/resources/animation/Monk/Dying.anim.meta
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "657d4193-2224-44ea-94f7-0305a9f2b322",
|
||||
"subMetas": {}
|
||||
}
|
Before Width: | Height: | Size: 269 KiB After Width: | Height: | Size: 314 KiB |
91
frontend/assets/resources/animation/MonkGirl/Atk4.anim
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Atk4",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5333333333333333,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "a9a10466-1e80-4fb8-9c32-2019ee2c988d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "e0e3907f-520c-4c4c-991a-ec554e24f368"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.1,
|
||||
"value": {
|
||||
"__uuid__": "e4bec6fe-db19-4cf6-a8cc-bfcc3e892d5e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "c36ceda7-2e5d-42f4-ae7b-02064348a1c2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "07004da9-abd4-4a05-baee-447235dcdf2d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "dd047451-9715-4e68-9ae5-4e4556007190"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "7b2acb5e-3ee8-4c26-b950-f201346cefde"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.31666666666666665,
|
||||
"value": {
|
||||
"__uuid__": "b378b873-fae7-49dd-8581-15136046e2f1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.36666666666666664,
|
||||
"value": {
|
||||
"__uuid__": "845b1de6-648f-422a-8289-98222175b787"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "df09902a-52d8-4dec-9d05-62d3428c4625"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "da55a31c-ce4a-4003-a119-8c76fd6d1a80"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "bd3f63fb-6d6d-47d2-9d96-2b58292fccfa"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "168df303-4b6a-4376-940c-3d36fa9e98d8",
|
||||
"subMetas": {}
|
||||
}
|
55
frontend/assets/resources/animation/MonkGirl/Dashing.anim
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Dashing",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.18333333333333332,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "b8c177cf-013e-4936-a031-2d3480cf975b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "ae2d8041-e7ee-4300-b3d6-3e85b146f33c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "f0518811-8fc9-4f9c-9ec4-401abdb3917d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.1,
|
||||
"value": {
|
||||
"__uuid__": "3117e445-fe0f-425f-83af-5b719bf8a009"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "f9d00d7d-2143-4893-be61-32cf1490c9f2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "daff32df-5e22-4d4e-94d2-6e4522a02138"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "d7b6d7c4-d2b5-49c6-bbcb-d8d80f52ae7e",
|
||||
"subMetas": {}
|
||||
}
|
61
frontend/assets/resources/animation/MonkGirl/Dying.anim
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Dying",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.45,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "0b31e6af-6d24-4915-b87b-772c6eb10ca7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "c597fb09-4621-4d1f-abf9-6484405a6330"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "8c8be852-b65d-41d8-800f-04cbb3cad094"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "f9522b47-812e-4020-845a-5d9f6d9aca90"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "1ff63b81-49d8-4d68-9526-5f0dc4c88ef0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "4e96b6fd-2cd1-412b-98a8-7f22040af589"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.43333333333333335,
|
||||
"value": {
|
||||
"__uuid__": "a827896b-00b5-4385-9648-2c40414b29c3"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "86706adc-e079-4997-883b-3e269d223065",
|
||||
"subMetas": {}
|
||||
}
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 227 KiB |
25
frontend/assets/resources/animation/MonkGirl/OnWall.anim
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "OnWall",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.016666666666666666,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "d5c1e6b4-1048-43e2-96f9-801dc23cf418"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "57358699-1d1b-44db-898c-df0c3ce9aab0",
|
||||
"subMetas": {}
|
||||
}
|
@@ -37,6 +37,8 @@ message PlayerDownsync {
|
||||
int32 onWallNormY = 28;
|
||||
|
||||
bool capturedByInertia = 29; // like "inAir", it’s by design a standalone field only inferred by the calc result of "applyInputFrameDownsyncDynamicsOnSingleRenderFrame" instead of "characterState"
|
||||
int32 revivalVirtualGridX = 30;
|
||||
int32 revivalVirtualGridY = 31;
|
||||
|
||||
string name = 997;
|
||||
string displayName = 998;
|
||||
|
@@ -25,16 +25,19 @@
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
},
|
||||
{
|
||||
"__id__": 22
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 22
|
||||
"__id__": 29
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 23
|
||||
"__id__": 30
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
@@ -324,8 +327,8 @@
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
@@ -483,12 +486,21 @@
|
||||
{
|
||||
"__uuid__": "e8247e2a-1b5b-4618-86f8-224b25246b55"
|
||||
},
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
{
|
||||
"__uuid__": "168df303-4b6a-4376-940c-3d36fa9e98d8"
|
||||
},
|
||||
null,
|
||||
{
|
||||
"__uuid__": "d7b6d7c4-d2b5-49c6-bbcb-d8d80f52ae7e"
|
||||
},
|
||||
{
|
||||
"__uuid__": "57358699-1d1b-44db-898c-df0c3ce9aab0"
|
||||
},
|
||||
{
|
||||
"__uuid__": "6e1139d4-03dd-4bd4-9510-606e94f629fe"
|
||||
},
|
||||
{
|
||||
"__uuid__": "86706adc-e079-4997-883b-3e269d223065"
|
||||
}
|
||||
],
|
||||
"playOnLoad": false,
|
||||
@@ -653,7 +665,9 @@
|
||||
{
|
||||
"__uuid__": "9b500cb0-8048-4715-81db-cc975c914225"
|
||||
},
|
||||
null,
|
||||
{
|
||||
"__uuid__": "2aef91f9-ef47-4bb4-bf43-5441723aa639"
|
||||
},
|
||||
null,
|
||||
{
|
||||
"__uuid__": "38b2c892-347b-4009-93f8-65b2ab1614f0"
|
||||
@@ -663,6 +677,9 @@
|
||||
},
|
||||
{
|
||||
"__uuid__": "e906322d-a08b-4477-a2e9-98acd42fa034"
|
||||
},
|
||||
{
|
||||
"__uuid__": "ac90c9b8-3b06-4866-89ce-2c953a9d5a9a"
|
||||
}
|
||||
],
|
||||
"playOnLoad": false,
|
||||
@@ -833,10 +850,15 @@
|
||||
{
|
||||
"__uuid__": "0abbd156-980e-475e-9994-3c958bd913fc"
|
||||
},
|
||||
null,
|
||||
{
|
||||
"__uuid__": "337d57ad-118c-40e2-be90-2aa1505c152b"
|
||||
},
|
||||
null,
|
||||
{
|
||||
"__uuid__": "edd23b2f-1caa-4836-88a7-e4af1f26743e"
|
||||
},
|
||||
{
|
||||
"__uuid__": "657d4193-2224-44ea-94f7-0305a9f2b322"
|
||||
}
|
||||
],
|
||||
"playOnLoad": false,
|
||||
@@ -892,6 +914,244 @@
|
||||
"fileId": "7aN7Gcc/tBw5EGlTJVBj2+",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "HpBar",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 23
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 26
|
||||
},
|
||||
{
|
||||
"__id__": 27
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 28
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 50,
|
||||
"height": 8
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
42.256,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "bar",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 22
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 24
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 25
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 10,
|
||||
"g": 252,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 50,
|
||||
"height": 8
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
-25,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 23
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "67e68bc9-dad5-4ad9-a2d8-7e03d458e32f"
|
||||
},
|
||||
"_type": 1,
|
||||
"_sizeMode": 0,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
|
||||
},
|
||||
"fileId": "1b5Rz5KABPK5Nv1wogghs6",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 22
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "88e79fd5-96b4-4a77-a1f4-312467171014"
|
||||
},
|
||||
"_type": 1,
|
||||
"_sizeMode": 0,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.ProgressBar",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 22
|
||||
},
|
||||
"_enabled": true,
|
||||
"_N$totalLength": 50,
|
||||
"_N$barSprite": {
|
||||
"__id__": 24
|
||||
},
|
||||
"_N$mode": 0,
|
||||
"_N$progress": 1,
|
||||
"_N$reverse": false,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
|
||||
},
|
||||
"fileId": "1cDdFO9Z5KYIcRR52ZmtqO",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "b74b05YDqZFRo4OkZRFZX8k",
|
||||
"_name": "",
|
||||
@@ -910,6 +1170,9 @@
|
||||
"coordLabel": {
|
||||
"__id__": 3
|
||||
},
|
||||
"hpBar": {
|
||||
"__id__": 27
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
|
@@ -24,11 +24,11 @@
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 12
|
||||
"__id__": 20
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 13
|
||||
"__id__": 21
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
@@ -90,12 +90,18 @@
|
||||
},
|
||||
{
|
||||
"__id__": 7
|
||||
},
|
||||
{
|
||||
"__id__": 11
|
||||
},
|
||||
{
|
||||
"__id__": 15
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [],
|
||||
"_prefab": {
|
||||
"__id__": 11
|
||||
"__id__": 19
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
@@ -211,38 +217,6 @@
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "6dcd5722-8ef9-47fd-9520-861d2713e274"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Animation",
|
||||
"_name": "",
|
||||
@@ -265,6 +239,34 @@
|
||||
"playOnLoad": false,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "6dcd5722-8ef9-47fd-9520-861d2713e274"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
@@ -278,7 +280,7 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "MeleeExplosion",
|
||||
"_name": "Fireball2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
@@ -314,6 +316,258 @@
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0.5,
|
||||
0.5,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Animation",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_enabled": true,
|
||||
"_defaultClip": null,
|
||||
"_clips": [
|
||||
{
|
||||
"__uuid__": "d2c65ac4-a5b3-411e-8d2d-18d3980649d7"
|
||||
},
|
||||
{
|
||||
"__uuid__": "14b92f5c-af81-416a-a162-e5822d20fe68"
|
||||
}
|
||||
],
|
||||
"playOnLoad": false,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "725c90f9-56f8-48ea-9159-4d2949cd3ce0"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "d92d4831-cd65-4eb5-90bd-b77021aec35b"
|
||||
},
|
||||
"fileId": "b0ZpleOHlFqIjwc8HDI9df",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Fireball3",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 12
|
||||
},
|
||||
{
|
||||
"__id__": 13
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Animation",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 11
|
||||
},
|
||||
"_enabled": true,
|
||||
"_defaultClip": null,
|
||||
"_clips": [
|
||||
{
|
||||
"__uuid__": "6aef5812-d16c-4da1-96a3-a38ac227c823"
|
||||
},
|
||||
{
|
||||
"__uuid__": "0dbb90ed-a08a-448c-b06e-4831260e9213"
|
||||
}
|
||||
],
|
||||
"playOnLoad": false,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 11
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "579bc0c1-f5e2-4a5d-889b-9d567e53b0e6"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "d92d4831-cd65-4eb5-90bd-b77021aec35b"
|
||||
},
|
||||
"fileId": "03W6UmKHVAz4hCpMvTCpP9",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "MeleeExplosion",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 16
|
||||
},
|
||||
{
|
||||
"__id__": 17
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 18
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
@@ -348,7 +602,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 7
|
||||
"__id__": 15
|
||||
},
|
||||
"_enabled": true,
|
||||
"_defaultClip": null,
|
||||
@@ -371,7 +625,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 7
|
||||
"__id__": 15
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [],
|
||||
|
@@ -77,6 +77,9 @@
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 49
|
||||
},
|
||||
{
|
||||
"__id__": 50
|
||||
},
|
||||
@@ -88,9 +91,6 @@
|
||||
},
|
||||
{
|
||||
"__id__": 53
|
||||
},
|
||||
{
|
||||
"__id__": 54
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@@ -156,9 +156,6 @@
|
||||
},
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 49
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@@ -539,7 +536,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
210.16474188040044,
|
||||
216.50635094610968,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -2301,24 +2298,6 @@
|
||||
"_originalHeight": 0,
|
||||
"_id": "2cxYjEIwNO6rUtXX4WcfnV"
|
||||
},
|
||||
{
|
||||
"__type__": "09e1b/tEy5K2qaPIpqHDbae",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
"_enabled": true,
|
||||
"BGMEffect": null,
|
||||
"crashedByTrapBullet": null,
|
||||
"highScoreTreasurePicked": null,
|
||||
"treasurePicked": null,
|
||||
"countDown10SecToEnd": null,
|
||||
"mapNode": {
|
||||
"__id__": 3
|
||||
},
|
||||
"_id": "3crA1nz5xPSLAnCSLQIPOq"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Canvas",
|
||||
"_name": "",
|
||||
@@ -2360,7 +2339,7 @@
|
||||
"mapNode": {
|
||||
"__id__": 3
|
||||
},
|
||||
"speed": 5000,
|
||||
"speed": 500,
|
||||
"_id": "76ImpM7XtPSbiLHDXdsJa+"
|
||||
},
|
||||
{
|
||||
|
@@ -461,7 +461,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
209.73151519075364,
|
||||
216.50635094610968,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@@ -547,7 +547,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
210.53572189052173,
|
||||
216.50635094610968,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -2313,7 +2313,7 @@
|
||||
"mapNode": {
|
||||
"__id__": 3
|
||||
},
|
||||
"speed": 5000,
|
||||
"speed": 500,
|
||||
"_id": "76ImpM7XtPSbiLHDXdsJa+"
|
||||
},
|
||||
{
|
||||
|
@@ -19,6 +19,7 @@ window.ATK_CHARACTER_STATE = {
|
||||
Dashing: [15, "Dashing"],
|
||||
OnWall: [16, "OnWall"],
|
||||
TurnAround1: [17, "TurnAround1"],
|
||||
Dying: [18, "Dying"],
|
||||
};
|
||||
|
||||
window.ATK_CHARACTER_STATE_ARR = [];
|
||||
|
@@ -8,7 +8,7 @@ cc.Class({
|
||||
},
|
||||
speed: {
|
||||
type: cc.Float,
|
||||
default: 500
|
||||
default: 100
|
||||
},
|
||||
},
|
||||
|
||||
@@ -29,6 +29,15 @@ cc.Class({
|
||||
if (!selfPlayerRichInfo) return;
|
||||
const selfPlayerNode = selfPlayerRichInfo.node;
|
||||
if (!selfPlayerNode) return;
|
||||
self.mapNode.setPosition(cc.v2().sub(selfPlayerNode.position));
|
||||
const dst = cc.v2().sub(selfPlayerNode.position);
|
||||
const pDiff = dst.sub(self.mapNode.position);
|
||||
const stepLength = dt * self.speed;
|
||||
if (stepLength > pDiff.mag()) {
|
||||
self.mapNode.setPosition(dst);
|
||||
} else {
|
||||
pDiff.normalizeSelf();
|
||||
const newMapPos = self.mapNode.position.add(pDiff.mul(dt * self.speed));
|
||||
self.mapNode.setPosition(newMapPos);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -10,7 +10,11 @@ cc.Class({
|
||||
coordLabel: {
|
||||
type: cc.Label,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
hpBar: {
|
||||
type: cc.ProgressBar,
|
||||
default: null
|
||||
},
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
|
@@ -43,10 +43,10 @@ window.onUdpMessage = (args) => {
|
||||
//cc.log(`#2 Js called back by CPP for upsync: onUdpMessage: ${JSON.stringify(req)}`);
|
||||
if (req.act && window.UPSYNC_MSG_ACT_PLAYER_CMD == req.act) {
|
||||
let effCnt = 0;
|
||||
const renderedInputFrameIdUpper = gopkgs.ConvertToDelayedInputFrameId(self.renderFrameId);
|
||||
const peerJoinIndex = req.joinIndex;
|
||||
if (peerJoinIndex == self.selfPlayerInfo.JoinIndex) return;
|
||||
const batch = req.inputFrameUpsyncBatch;
|
||||
self.onPeerInputFrameUpsync(peerJoinIndex, batch);
|
||||
self.onPeerInputFrameUpsync(peerJoinIndex, batch, true);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -144,7 +144,7 @@ cc.Class({
|
||||
return (confirmedList + 1) == (1 << this.playerRichInfoDict.size);
|
||||
},
|
||||
|
||||
getOrPrefabInputFrameUpsync(inputFrameId) {
|
||||
getOrPrefabInputFrameUpsync(inputFrameId, canConfirmSelf) {
|
||||
// TODO: find some kind of synchronization mechanism against "onInputFrameDownsyncBatch"!
|
||||
const self = this;
|
||||
if (
|
||||
@@ -157,33 +157,48 @@ cc.Class({
|
||||
let previousSelfInput = null,
|
||||
currSelfInput = null;
|
||||
const joinIndex = self.selfPlayerInfo.JoinIndex;
|
||||
const selfJoinIndexMask = (1 << (joinIndex - 1));
|
||||
const existingInputFrame = self.recentInputCache.GetByFrameId(inputFrameId);
|
||||
const previousInputFrameDownsync = self.recentInputCache.GetByFrameId(inputFrameId - 1);
|
||||
previousSelfInput = (null == previousInputFrameDownsync ? null : previousInputFrameDownsync.InputList[joinIndex - 1]);
|
||||
if (null != existingInputFrame) {
|
||||
if (
|
||||
null != existingInputFrame
|
||||
&&
|
||||
(true != canConfirmSelf)
|
||||
) {
|
||||
// This could happen upon either [type#1] or [type#2] forceConfirmation, where "refRenderFrame" is accompanied by some "inputFrameDownsyncs". The check here also guarantees that we don't override history
|
||||
//console.log(`noDelayInputFrameId=${inputFrameId} already exists in recentInputCache: recentInputCache=${self._stringifyRecentInputCache(false)}`);
|
||||
return [previousSelfInput, existingInputFrame.InputList[joinIndex - 1]];
|
||||
}
|
||||
|
||||
const lastAllConfirmedInputFrame = self.recentInputCache.GetByFrameId(self.lastAllConfirmedInputFrameId);
|
||||
const prefabbedInputList = new Array(self.playerRichInfoDict.size).fill(0);
|
||||
// the returned "gopkgs.NewInputFrameDownsync.InputList" is immutable, thus we can only modify the values in "prefabbedInputList"
|
||||
for (let k in prefabbedInputList) {
|
||||
if (null != previousInputFrameDownsync) {
|
||||
for (let k = 0; k < window.boundRoomCapacity; ++k) {
|
||||
if (null != existingInputFrame) {
|
||||
// When "null != existingInputFrame", it implies that "true == canConfirmSelf" here, we just have to assign "prefabbedInputList[(joinIndex-1)]" specifically and copy all others
|
||||
prefabbedInputList[k] = existingInputFrame.InputList[k];
|
||||
} else if (self.lastIndividuallyConfirmedInputFrameId[k] <= inputFrameId) {
|
||||
prefabbedInputList[k] = self.lastIndividuallyConfirmedInputList[k];
|
||||
// Don't predict "btnA & btnB"!
|
||||
prefabbedInputList[k] = (prefabbedInputList[k] & 15);
|
||||
} else if (null != previousInputFrameDownsync) {
|
||||
// When "self.lastIndividuallyConfirmedInputFrameId[k] > inputFrameId", don't use it to predict a historical input!
|
||||
prefabbedInputList[k] = previousInputFrameDownsync.InputList[k];
|
||||
// Don't predict "btnA & btnB"!
|
||||
prefabbedInputList[k] = (prefabbedInputList[k] & 15);
|
||||
}
|
||||
if (0 <= self.lastAllConfirmedInputFrameId && inputFrameId - 1 > self.lastAllConfirmedInputFrameId) {
|
||||
prefabbedInputList[k] = lastAllConfirmedInputFrame.InputList[k];
|
||||
}
|
||||
// Don't predict "btnA & btnB"!
|
||||
prefabbedInputList[k] = (prefabbedInputList[k] & 15);
|
||||
}
|
||||
let initConfirmedList = 0;
|
||||
if (null != existingInputFrame) {
|
||||
// When "null != existingInputFrame", it implies that "true == canConfirmSelf" here
|
||||
initConfirmedList = (existingInputFrame.ConfirmedList | selfJoinIndexMask);
|
||||
}
|
||||
currSelfInput = self.ctrl.getEncodedInput(); // When "null == existingInputFrame", it'd be safe to say that the realtime "self.ctrl.getEncodedInput()" is for the requested "inputFrameId"
|
||||
prefabbedInputList[(joinIndex - 1)] = currSelfInput;
|
||||
while (self.recentInputCache.EdFrameId <= inputFrameId) {
|
||||
// Fill the gap
|
||||
const prefabbedInputFrameDownsync = gopkgs.NewInputFrameDownsync(self.recentInputCache.EdFrameId, prefabbedInputList.slice(), (1 << (joinIndex - 1)));
|
||||
// [WARNING] Do not blindly use "selfJoinIndexMask" here, as the "actuallyUsedInput for self" couldn't be confirmed while prefabbing, otherwise we'd have confirmed a wrong self input by "_markConfirmationIfApplicable()"!
|
||||
const prefabbedInputFrameDownsync = gopkgs.NewInputFrameDownsync(self.recentInputCache.EdFrameId, prefabbedInputList.slice(), initConfirmedList);
|
||||
// console.log(`Prefabbed inputFrameId=${prefabbedInputFrameDownsync.InputFrameId}`);
|
||||
self.recentInputCache.Put(prefabbedInputFrameDownsync);
|
||||
}
|
||||
@@ -355,6 +370,8 @@ cc.Class({
|
||||
self.lastUpsyncInputFrameId = -1;
|
||||
self.chaserRenderFrameId = -1; // at any moment, "chaserRenderFrameId <= renderFrameId", but "chaserRenderFrameId" would fluctuate according to "onInputFrameDownsyncBatch"
|
||||
|
||||
self.lastIndividuallyConfirmedInputFrameId = new Array(window.boundRoomCapacity).fill(-1);
|
||||
self.lastIndividuallyConfirmedInputList = new Array(window.boundRoomCapacity).fill(0);
|
||||
self.recentRenderCache = new RingBuffer(self.renderCacheSize);
|
||||
|
||||
self.recentInputCache = gopkgs.NewRingBufferJs((self.renderCacheSize >> 1) + 1);
|
||||
@@ -377,6 +394,8 @@ cc.Class({
|
||||
self.networkDoctor = new NetworkDoctor(20);
|
||||
self.skipRenderFrameFlag = false;
|
||||
|
||||
self.allowRollbackOnPeerUpsync = true;
|
||||
|
||||
self.countdownNanos = null;
|
||||
if (self.countdownLabel) {
|
||||
self.countdownLabel.string = "";
|
||||
@@ -639,7 +658,7 @@ cc.Class({
|
||||
const jsPlayersArr = new Array(pbRdf.playersArr.length).fill(null);
|
||||
for (let k = 0; k < pbRdf.playersArr.length; ++k) {
|
||||
const pbPlayer = pbRdf.playersArr[k];
|
||||
const jsPlayer = gopkgs.NewPlayerDownsyncJs(pbPlayer.id, pbPlayer.virtualGridX, pbPlayer.virtualGridY, pbPlayer.dirX, pbPlayer.dirY, pbPlayer.velX, pbPlayer.velY, pbPlayer.framesToRecover, pbPlayer.framesInChState, pbPlayer.activeSkillId, pbPlayer.activeSkillHit, pbPlayer.framesInvinsible, pbPlayer.speed, pbPlayer.battleState, pbPlayer.characterState, pbPlayer.joinIndex, pbPlayer.hp, pbPlayer.maxHp, pbPlayer.colliderRadius, pbPlayer.inAir, pbPlayer.onWall, pbPlayer.onWallNormX, pbPlayer.onWallNormY, pbPlayer.capturedByInertia, pbPlayer.bulletTeamId, pbPlayer.chCollisionTeamId);
|
||||
const jsPlayer = gopkgs.NewPlayerDownsyncJs(pbPlayer.id, pbPlayer.virtualGridX, pbPlayer.virtualGridY, pbPlayer.dirX, pbPlayer.dirY, pbPlayer.velX, pbPlayer.velY, pbPlayer.framesToRecover, pbPlayer.framesInChState, pbPlayer.activeSkillId, pbPlayer.activeSkillHit, pbPlayer.framesInvinsible, pbPlayer.speed, pbPlayer.battleState, pbPlayer.characterState, pbPlayer.joinIndex, pbPlayer.hp, pbPlayer.maxHp, pbPlayer.colliderRadius, pbPlayer.inAir, pbPlayer.onWall, pbPlayer.onWallNormX, pbPlayer.onWallNormY, pbPlayer.capturedByInertia, pbPlayer.bulletTeamId, pbPlayer.chCollisionTeamId, pbPlayer.revivalVirtualGridX, pbPlayer.revivalVirtualGridY);
|
||||
jsPlayersArr[k] = jsPlayer;
|
||||
}
|
||||
const jsMeleeBulletsArr = new Array(pbRdf.meleeBullets.length).fill(null);
|
||||
@@ -716,6 +735,7 @@ cc.Class({
|
||||
self.hideFindingPlayersGUI();
|
||||
console.warn('On battle resynced! renderFrameId=', rdf.Id);
|
||||
}
|
||||
|
||||
self.renderFrameId = rdf.Id;
|
||||
self.lastRenderFrameIdTriggeredAt = performance.now();
|
||||
// In this case it must be true that "rdf.id > chaserRenderFrameId".
|
||||
@@ -726,11 +746,16 @@ cc.Class({
|
||||
self.ctrl = canvasNode.getComponent("TouchEventsManager");
|
||||
self.enableInputControls();
|
||||
self.transitToState(ALL_MAP_STATES.VISUAL);
|
||||
|
||||
const selfPlayerRichInfo = self.playerRichInfoDict.get(self.selfPlayerInfo.Id);
|
||||
const newMapPos = cc.v2().sub(selfPlayerRichInfo.node.position);
|
||||
self.node.setPosition(newMapPos);
|
||||
self.battleState = ALL_BATTLE_STATES.IN_BATTLE;
|
||||
}
|
||||
|
||||
// [WARNING] "cc.Node.removeChild" would trigger massive update of rendering nodes, thus a performance impact at the beginning of battle, avoid it by just moving the widget to infinitely far away!
|
||||
if (self.countdownToBeginGameNode && self.countdownToBeginGameNode.parent) {
|
||||
self.countdownToBeginGameNode.parent.removeChild(self.countdownToBeginGameNode);
|
||||
self.countdownToBeginGameNode.setPosition(cc.v2(Number.MAX_VALUE, Number.MAX_VALUE));
|
||||
}
|
||||
|
||||
if (null != self.musicEffectManagerScriptIns) {
|
||||
@@ -814,6 +839,19 @@ cc.Class({
|
||||
return true;
|
||||
},
|
||||
|
||||
_markConfirmationIfApplicable() {
|
||||
const self = this;
|
||||
let newAllConfirmedCnt = 0;
|
||||
while (self.recentInputCache.StFrameId <= self.lastAllConfirmedInputFrameId && self.lastAllConfirmedInputFrameId < self.recentInputCache.EdFrameId) {
|
||||
const inputFrameDownsync = self.recentInputCache.GetByFrameId(self.lastAllConfirmedInputFrameId);
|
||||
if (null == inputFrameDownsync) break;
|
||||
if (self._allConfirmed(inputFrameDownsync.ConfirmedList)) break;
|
||||
++self.lastAllConfirmedInputFrameId;
|
||||
++newAllConfirmedCnt;
|
||||
}
|
||||
return newAllConfirmedCnt;
|
||||
},
|
||||
|
||||
onInputFrameDownsyncBatch(batch /* []*pb.InputFrameDownsync */ ) {
|
||||
// TODO: find some kind of synchronization mechanism against "getOrPrefabInputFrameUpsync"!
|
||||
if (null == batch) {
|
||||
@@ -835,8 +873,9 @@ cc.Class({
|
||||
if (inputFrameDownsyncId <= self.lastAllConfirmedInputFrameId) {
|
||||
continue;
|
||||
}
|
||||
// [WARNING] Take all "inputFrameDownsync" from backend as all-confirmed, it'll be later checked by "rollbackAndChase".
|
||||
// [WARNING] Now that "inputFrameDownsyncId > self.lastAllConfirmedInputFrameId", we should make an update immediately because unlike its backend counterpart "Room.LastAllConfirmedInputFrameId", the frontend "mapIns.lastAllConfirmedInputFrameId" might inevitably get gaps among discrete values due to "either type#1 or type#2 forceConfirmation" -- and only "onInputFrameDownsyncBatch" can catch this!
|
||||
self.lastAllConfirmedInputFrameId = inputFrameDownsyncId;
|
||||
|
||||
const localInputFrame = self.recentInputCache.GetByFrameId(inputFrameDownsyncId);
|
||||
if (null != localInputFrame
|
||||
&&
|
||||
@@ -846,16 +885,29 @@ cc.Class({
|
||||
) {
|
||||
firstPredictedYetIncorrectInputFrameId = inputFrameDownsyncId;
|
||||
}
|
||||
// [WARNING] Take all "inputFrameDownsync" from backend as all-confirmed, it'll be later checked by "rollbackAndChase".
|
||||
inputFrameDownsync.confirmedList = (1 << self.playerRichInfoDict.size) - 1;
|
||||
const inputFrameDownsyncLocal = gopkgs.NewInputFrameDownsync(inputFrameDownsync.inputFrameId, inputFrameDownsync.inputList, inputFrameDownsync.confirmedList); // "battle.InputFrameDownsync" in "jsexport"
|
||||
for (let j in self.playerRichInfoArr) {
|
||||
const jj = parseInt(j);
|
||||
if (inputFrameDownsync.inputFrameId > self.lastIndividuallyConfirmedInputFrameId[jj]) {
|
||||
self.lastIndividuallyConfirmedInputFrameId[jj] = inputFrameDownsync.inputFrameId;
|
||||
self.lastIndividuallyConfirmedInputList[jj] = inputFrameDownsync.inputList[jj];
|
||||
}
|
||||
}
|
||||
//console.log(`Confirmed inputFrameId=${inputFrameDownsync.inputFrameId}`);
|
||||
const [ret, oldStFrameId, oldEdFrameId] = self.recentInputCache.SetByFrameId(inputFrameDownsyncLocal, inputFrameDownsync.inputFrameId);
|
||||
if (window.RING_BUFF_FAILED_TO_SET == ret) {
|
||||
throw `Failed to dump input cache (maybe recentInputCache too small)! inputFrameDownsync.inputFrameId=${inputFrameDownsync.inputFrameId}, lastAllConfirmedInputFrameId=${self.lastAllConfirmedInputFrameId}; recentRenderCache=${self._stringifyRecentRenderCache(false)}, recentInputCache=${self._stringifyRecentInputCache(false)}`;
|
||||
}
|
||||
}
|
||||
self._markConfirmationIfApplicable();
|
||||
self._handleIncorrectlyRenderedPrediction(firstPredictedYetIncorrectInputFrameId, batch, false);
|
||||
},
|
||||
|
||||
_handleIncorrectlyRenderedPrediction(firstPredictedYetIncorrectInputFrameId, batch, fromUDP) {
|
||||
if (null == firstPredictedYetIncorrectInputFrameId) return;
|
||||
const self = this;
|
||||
const renderFrameId1 = gopkgs.ConvertToFirstUsedRenderFrameId(firstPredictedYetIncorrectInputFrameId) - 1;
|
||||
if (renderFrameId1 >= self.chaserRenderFrameId) return;
|
||||
|
||||
@@ -871,15 +923,21 @@ cc.Class({
|
||||
--------------------------------------------------------
|
||||
*/
|
||||
// The actual rollback-and-chase would later be executed in update(dt).
|
||||
console.log(`Mismatched input detected, resetting chaserRenderFrameId: ${self.chaserRenderFrameId}->${renderFrameId1} by firstPredictedYetIncorrectInputFrameId: ${firstPredictedYetIncorrectInputFrameId}
|
||||
console.log(`Mismatched input detected, resetting chaserRenderFrameId: ${self.chaserRenderFrameId}->${renderFrameId1} by
|
||||
firstPredictedYetIncorrectInputFrameId: ${firstPredictedYetIncorrectInputFrameId}
|
||||
lastAllConfirmedInputFrameId=${self.lastAllConfirmedInputFrameId}
|
||||
recentInputCache=${self._stringifyRecentInputCache(false)}
|
||||
batchInputFrameIdRange=[${batch[0].inputFrameId}, ${batch[batch.length - 1].inputFrameId}]`);
|
||||
batchInputFrameIdRange=[${batch[0].inputFrameId}, ${batch[batch.length - 1].inputFrameId}]
|
||||
fromUDP=${fromUDP}`);
|
||||
self.chaserRenderFrameId = renderFrameId1;
|
||||
self.networkDoctor.logRollbackFrames(self.renderFrameId - self.chaserRenderFrameId);
|
||||
let rollbackFrames = (self.renderFrameId - self.chaserRenderFrameId);
|
||||
if (0 > rollbackFrames) {
|
||||
rollbackFrames = 0;
|
||||
}
|
||||
self.networkDoctor.logRollbackFrames(rollbackFrames);
|
||||
},
|
||||
|
||||
onPeerInputFrameUpsync(peerJoinIndex, batch /* []*pb.InputFrameDownsync */ ) {
|
||||
onPeerInputFrameUpsync(peerJoinIndex, batch, fromUDP) {
|
||||
// TODO: find some kind of synchronization mechanism against "getOrPrefabInputFrameUpsync"!
|
||||
// See `<proj-root>/ConcerningEdgeCases.md` for why this method exists.
|
||||
if (null == batch) {
|
||||
@@ -895,36 +953,58 @@ batchInputFrameIdRange=[${batch[0].inputFrameId}, ${batch[batch.length - 1].inpu
|
||||
|
||||
let effCnt = 0;
|
||||
//console.log(`Received peer inputFrameUpsync batch w/ inputFrameId in [${batch[0].inputFrameId}, ${batch[batch.length - 1].inputFrameId}] for prediction assistance`);
|
||||
let firstPredictedYetIncorrectInputFrameId = null;
|
||||
const renderedInputFrameIdUpper = gopkgs.ConvertToDelayedInputFrameId(self.renderFrameId);
|
||||
for (let k in batch) {
|
||||
const inputFrameDownsync = batch[k];
|
||||
const inputFrameDownsyncId = inputFrameDownsync.inputFrameId;
|
||||
if (inputFrameDownsyncId < renderedInputFrameIdUpper) {
|
||||
// Avoid obfuscating already rendered history
|
||||
const inputFrame = batch[k]; // could be either "pb.InputFrameDownsync" or "pb.InputFrameUpsync", depending on "fromUDP"
|
||||
const inputFrameId = inputFrame.inputFrameId;
|
||||
const peerEncodedInput = (true == fromUDP ? inputFrame.encoded : inputFrame.inputList[peerJoinIndex - 1]);
|
||||
if (false == self.allowRollbackOnPeerUpsync && inputFrameId <= renderedInputFrameIdUpper) {
|
||||
// [WARNING] Avoid obfuscating already rendered history, even at "inputFrameId == renderedInputFrameIdUpper", due to the use of "INPUT_SCALE_FRAMES" some previous render frames might already be rendered with "inputFrameId"!
|
||||
continue;
|
||||
}
|
||||
if (inputFrameDownsyncId <= self.lastAllConfirmedInputFrameId) {
|
||||
if (inputFrameId <= self.lastAllConfirmedInputFrameId) {
|
||||
// [WARNING] Don't reject it by "inputFrameId <= self.lastIndividuallyConfirmedInputFrameId[peerJoinIndex-1]", the arrival of UDP packets might not reserve their sending order!
|
||||
continue;
|
||||
}
|
||||
self.getOrPrefabInputFrameUpsync(inputFrameDownsyncId); // Make sure that inputFrame exists locally
|
||||
const existingInputFrame = self.recentInputCache.GetByFrameId(inputFrameDownsyncId);
|
||||
if (0 < (existingInputFrame.ConfirmedList & (1 << (peerJoinIndex - 1)))) {
|
||||
const peerJoinIndexMask = (1 << (peerJoinIndex - 1));
|
||||
self.getOrPrefabInputFrameUpsync(inputFrameId, false); // Make sure that inputFrame exists locally
|
||||
const existingInputFrame = self.recentInputCache.GetByFrameId(inputFrameId);
|
||||
if (0 < (existingInputFrame.ConfirmedList & peerJoinIndexMask)) {
|
||||
continue;
|
||||
}
|
||||
if (inputFrameId > self.lastIndividuallyConfirmedInputFrameId[peerJoinIndex - 1]) {
|
||||
self.lastIndividuallyConfirmedInputFrameId[peerJoinIndex - 1] = inputFrameId;
|
||||
self.lastIndividuallyConfirmedInputList[peerJoinIndex - 1] = peerEncodedInput;
|
||||
}
|
||||
effCnt += 1;
|
||||
// the returned "gopkgs.NewInputFrameDownsync.InputList" is immutable, thus we can only modify the values in "newInputList" and "newConfirmedList"!
|
||||
let newInputList = new Array(self.playerRichInfoDict.size).fill(0);
|
||||
for (let i in existingInputFrame.InputList) {
|
||||
newInputList[i] = existingInputFrame.InputList[i];
|
||||
let newInputList = existingInputFrame.InputList.slice();
|
||||
newInputList[peerJoinIndex - 1] = peerEncodedInput;
|
||||
let newConfirmedList = (existingInputFrame.ConfirmedList | peerJoinIndex);
|
||||
const newInputFrameDownsyncLocal = gopkgs.NewInputFrameDownsync(inputFrameId, newInputList, newConfirmedList);
|
||||
//console.log(`Updated encoded input of peerJoinIndex=${peerJoinIndex} to ${peerEncodedInput} for inputFrameId=${inputFrameId}/renderedInputFrameIdUpper=${renderedInputFrameIdUpper} from ${JSON.stringify(inputFrame)}; newInputFrameDownsyncLocal=${self.gopkgsInputFrameDownsyncStr(newInputFrameDownsyncLocal)}; existingInputFrame=${self.gopkgsInputFrameDownsyncStr(existingInputFrame)}`);
|
||||
self.recentInputCache.SetByFrameId(newInputFrameDownsyncLocal, inputFrameId);
|
||||
|
||||
if (self.allowRollbackOnPeerUpsync) {
|
||||
// Reaching here implies that "true == self.allowRollbackOnPeerUpsync".
|
||||
// Shall we update the "chaserRenderFrameId" if the rendered history was wrong? It doesn't seem to impact eventual correctness if we allow the update of "chaserRenderFrameId" upon "inputFrameId <= renderedInputFrameIdUpper" here, however UDP upsync doesn't reserve order from a same sender and there might be multiple other senders, hence it might result in unnecessarily frequent chasing.
|
||||
if (
|
||||
null == firstPredictedYetIncorrectInputFrameId
|
||||
&&
|
||||
existingInputFrame.InputList[peerJoinIndex - 1] != peerEncodedInput
|
||||
) {
|
||||
firstPredictedYetIncorrectInputFrameId = inputFrameId;
|
||||
}
|
||||
}
|
||||
let newConfirmedList = (existingInputFrame.confirmedList | (1 << (peerJoinIndex - 1)));
|
||||
// No need to change "lastAllConfirmedInputFrameId", leave it to "onInputFrameDownsyncBatch" -- we're just helping prediction here
|
||||
const newInputFrameDownsyncLocal = gopkgs.NewInputFrameDownsync(inputFrameDownsyncId, newInputList, newConfirmedList);
|
||||
self.recentInputCache.SetByFrameId(newInputFrameDownsyncLocal, inputFrameDownsyncId);
|
||||
}
|
||||
if (0 < effCnt) {
|
||||
//self._markConfirmationIfApplicable();
|
||||
self.networkDoctor.logPeerInputFrameUpsync(batch[0].inputFrameId, batch[batch.length - 1].inputFrameId);
|
||||
}
|
||||
if (true == self.allowRollbackOnPeerUpsync) {
|
||||
self._handleIncorrectlyRenderedPrediction(firstPredictedYetIncorrectInputFrameId, batch, fromUDP);
|
||||
}
|
||||
},
|
||||
|
||||
onPlayerAdded(rdf /* pb.RoomDownsyncFrame */ ) {
|
||||
@@ -942,7 +1022,6 @@ batchInputFrameIdRange=[${batch[0].inputFrameId}, ${batch[batch.length - 1].inpu
|
||||
if (ALL_BATTLE_STATES.IN_BATTLE != self.battleState) {
|
||||
return;
|
||||
}
|
||||
self._stringifyRdfIdToActuallyUsedInput();
|
||||
window.closeWSConnection(constants.RET_CODE.BATTLE_STOPPED, "");
|
||||
self.battleState = ALL_BATTLE_STATES.IN_SETTLEMENT;
|
||||
self.countdownNanos = null;
|
||||
@@ -1005,17 +1084,20 @@ batchInputFrameIdRange=[${batch[0].inputFrameId}, ${batch[batch.length - 1].inpu
|
||||
}
|
||||
try {
|
||||
let st = performance.now();
|
||||
if (cc.sys.isNative) {
|
||||
DelayNoMore.UdpSession.pollUdpRecvRingBuff();
|
||||
}
|
||||
const noDelayInputFrameId = gopkgs.ConvertToNoDelayInputFrameId(self.renderFrameId);
|
||||
let prevSelfInput = null,
|
||||
currSelfInput = null;
|
||||
if (gopkgs.ShouldGenerateInputFrameUpsync(self.renderFrameId)) {
|
||||
[prevSelfInput, currSelfInput] = self.getOrPrefabInputFrameUpsync(noDelayInputFrameId);
|
||||
[prevSelfInput, currSelfInput] = self.getOrPrefabInputFrameUpsync(noDelayInputFrameId, true);
|
||||
}
|
||||
|
||||
const delayedInputFrameId = gopkgs.ConvertToDelayedInputFrameId(self.renderFrameId);
|
||||
if (null == self.recentInputCache.GetByFrameId(delayedInputFrameId)) {
|
||||
// Possible edge case after resync, kindly note that it's OK to prefab a "future inputFrame" here, because "sendInputFrameUpsyncBatch" would be capped by "noDelayInputFrameId from self.renderFrameId".
|
||||
self.getOrPrefabInputFrameUpsync(delayedInputFrameId);
|
||||
self.getOrPrefabInputFrameUpsync(delayedInputFrameId, false);
|
||||
}
|
||||
|
||||
let t0 = performance.now();
|
||||
@@ -1039,7 +1121,12 @@ batchInputFrameIdRange=[${batch[0].inputFrameId}, ${batch[batch.length - 1].inpu
|
||||
|
||||
// Inside the following "self.rollbackAndChase" actually ROLLS FORWARD w.r.t. the corresponding delayedInputFrame, REGARDLESS OF whether or not "self.chaserRenderFrameId == self.renderFrameId" now.
|
||||
const latestRdfResults = self.rollbackAndChase(self.renderFrameId, self.renderFrameId + 1, self.gopkgsCollisionSys, self.gopkgsCollisionSysMap, false);
|
||||
self.networkDoctor.logRollbackFrames(self.renderFrameId - self.chaserRenderFrameId);
|
||||
|
||||
let rollbackFrames = (self.renderFrameId - self.chaserRenderFrameId);
|
||||
if (0 > rollbackFrames) {
|
||||
rollbackFrames = 0;
|
||||
}
|
||||
self.networkDoctor.logRollbackFrames(rollbackFrames);
|
||||
let prevRdf = latestRdfResults[0],
|
||||
rdf = latestRdfResults[1];
|
||||
/*
|
||||
@@ -1070,7 +1157,7 @@ othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame
|
||||
++self.renderFrameId; // [WARNING] It's important to increment the renderFrameId AFTER all the operations above!!!
|
||||
self.lastRenderFrameIdTriggeredAt = performance.now();
|
||||
let t3 = performance.now();
|
||||
self.skipRenderFrameFlag = self.networkDoctor.isTooFast();
|
||||
self.skipRenderFrameFlag = self.networkDoctor.isTooFast(self);
|
||||
} catch (err) {
|
||||
console.error("Error during Map.update", err);
|
||||
self.onBattleStopped(); // TODO: Popup to ask player to refresh browser
|
||||
@@ -1161,8 +1248,10 @@ othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame
|
||||
|
||||
hideFindingPlayersGUI(rdf) {
|
||||
const self = this;
|
||||
if (null == self.findingPlayerNode.parent) return;
|
||||
self.findingPlayerNode.parent.removeChild(self.findingPlayerNode);
|
||||
// [WARNING] "cc.Node.removeChild" would trigger massive update of rendering nodes, thus a performance impact at the beginning of battle, avoid it by just moving the widget to infinitely far away!
|
||||
if (self.findingPlayerNode && self.findingPlayerNode.parent) {
|
||||
self.findingPlayerNode.setPosition(cc.v2(Number.MAX_VALUE, Number.MAX_VALUE));
|
||||
}
|
||||
},
|
||||
|
||||
onBattleReadyToStart(rdf /* pb.RoomDownsyncFrame */ ) {
|
||||
@@ -1206,6 +1295,7 @@ othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame
|
||||
playerRichInfo.node.setPosition(wx, wy);
|
||||
playerRichInfo.scriptIns.updateSpeed(currPlayerDownsync.Speed);
|
||||
playerRichInfo.scriptIns.updateCharacterAnim(currPlayerDownsync, prevRdfPlayer, false, chConfig);
|
||||
playerRichInfo.scriptIns.hpBar.progress = (currPlayerDownsync.Hp * 1.0) / currPlayerDownsync.MaxHp;
|
||||
}
|
||||
|
||||
// Move all to infinitely far away first
|
||||
@@ -1419,6 +1509,21 @@ othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame
|
||||
return s.join(',');
|
||||
},
|
||||
|
||||
gopkgsInputFrameDownsyncStr(inputFrameDownsync) {
|
||||
if (null == inputFrameDownsync) return "{}";
|
||||
const self = this;
|
||||
let s = [];
|
||||
s.push(`InputFrameId:${inputFrameDownsync.InputFrameId}`);
|
||||
let ss = [];
|
||||
for (let k = 0; k < window.boundRoomCapacity; ++k) {
|
||||
ss.push(`"${inputFrameDownsync.InputList[k]}"`);
|
||||
}
|
||||
s.push(`InputList:[${ss.join(',')}]`);
|
||||
s.push(`ConfirmedList:${inputFrameDownsync.ConfirmedList}`);
|
||||
|
||||
return `{${s.join(',')}}`;
|
||||
},
|
||||
|
||||
_stringifyRdfIdToActuallyUsedInput() {
|
||||
const self = this;
|
||||
let s = [];
|
||||
|
@@ -79,17 +79,29 @@ NetworkDoctor.prototype.logSkippedRenderFrameCnt = function() {
|
||||
this.skippedRenderFrameCnt += 1;
|
||||
}
|
||||
|
||||
NetworkDoctor.prototype.isTooFast = function() {
|
||||
return false;
|
||||
NetworkDoctor.prototype.isTooFast = function(mapIns) {
|
||||
const [sendingFps, srvDownsyncFps, peerUpsyncFps, rollbackFrames, skippedRenderFrameCnt] = this.stats();
|
||||
if (sendingFps >= this.inputRateThreshold + 2) {
|
||||
if (sendingFps >= this.inputRateThreshold + 3) {
|
||||
// Don't send too fast
|
||||
console.log(`Sending too fast, sendingFps=${sendingFps}`);
|
||||
return true;
|
||||
} else if (sendingFps >= this.inputRateThreshold && srvDownsyncFps >= this.inputRateThreshold) {
|
||||
} else {
|
||||
const sendingFpsNormal = (sendingFps >= this.inputRateThreshold);
|
||||
// An outstanding lag within the "inputFrameDownsyncQ" will reduce "srvDownsyncFps", HOWEVER, a constant lag wouldn't impact "srvDownsyncFps"! In native platforms we might use PING value might help as a supplement information to confirm that the "selfPlayer" is not lagged within the time accounted by "inputFrameDownsyncQ".
|
||||
if (rollbackFrames >= this.rollbackFramesThreshold) {
|
||||
// I got many frames rolled back while none of my peers effectively helped my preciction. Deliberately not using "peerUpsyncThreshold" here because when using UDP p2p upsync broadcasting, we expect to receive effective p2p upsyncs from every other player.
|
||||
return true;
|
||||
const recvFpsNormal = (srvDownsyncFps >= this.inputRateThreshold || peerUpsyncFps >= this.inputRateThreshold * (window.boundRoomCapacity - 1));
|
||||
if (sendingFpsNormal && recvFpsNormal) {
|
||||
let selfInputFrameIdFront = gopkgs.ConvertToNoDelayInputFrameId(mapIns.renderFrameId);
|
||||
let minInputFrameIdFront = Number.MAX_VALUE;
|
||||
for (let k = 0; k < window.boundRoomCapacity; ++k) {
|
||||
if (k + 1 == mapIns.selfPlayerInfo.JoinIndex) continue;
|
||||
if (mapIns.lastIndividuallyConfirmedInputFrameId[k] >= minInputFrameIdFront) continue;
|
||||
minInputFrameIdFront = mapIns.lastIndividuallyConfirmedInputFrameId[k];
|
||||
}
|
||||
if ((selfInputFrameIdFront > minInputFrameIdFront) && ((selfInputFrameIdFront - minInputFrameIdFront) > (mapIns.inputFrameUpsyncDelayTolerance + 1))) {
|
||||
// first comparison condition is to avoid numeric overflow
|
||||
console.log(`Game logic ticking too fast, selfInputFrameIdFront=${selfInputFrameIdFront}, minInputFrameIdFront=${minInputFrameIdFront}, inputFrameUpsyncDelayTolerance=${mapIns.inputFrameUpsyncDelayTolerance}`);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@@ -98,7 +98,7 @@ cc.Class({
|
||||
const p2Vpos = gopkgs.WorldToVirtualGridPos(boundaryObjs.playerStartingPositions[1].x, boundaryObjs.playerStartingPositions[1].y);
|
||||
const colliderRadiusV = gopkgs.WorldToVirtualGridPos(12.0, 0);
|
||||
|
||||
const speciesIdList = [1, 4096];
|
||||
const speciesIdList = [4096, 0];
|
||||
const chConfigsOrderedByJoinIndex = gopkgs.GetCharacterConfigsOrderedByJoinIndex(speciesIdList);
|
||||
|
||||
const startRdf = window.pb.protos.RoomDownsyncFrame.create({
|
||||
@@ -109,6 +109,8 @@ cc.Class({
|
||||
joinIndex: 1,
|
||||
virtualGridX: p1Vpos[0],
|
||||
virtualGridY: p1Vpos[1],
|
||||
revivalVirtualGridX: p1Vpos[0],
|
||||
revivalVirtualGridY: p1Vpos[1],
|
||||
speed: chConfigsOrderedByJoinIndex[0].Speed,
|
||||
colliderRadius: colliderRadiusV[0],
|
||||
characterState: window.ATK_CHARACTER_STATE.InAirIdle1NoJump[0],
|
||||
@@ -119,12 +121,16 @@ cc.Class({
|
||||
velY: 0,
|
||||
inAir: true,
|
||||
onWall: false,
|
||||
hp: 100,
|
||||
maxHp: 100,
|
||||
}),
|
||||
window.pb.protos.PlayerDownsync.create({
|
||||
id: 11,
|
||||
joinIndex: 2,
|
||||
virtualGridX: p2Vpos[0],
|
||||
virtualGridY: p2Vpos[1],
|
||||
revivalVirtualGridX: p2Vpos[0],
|
||||
revivalVirtualGridY: p2Vpos[1],
|
||||
speed: chConfigsOrderedByJoinIndex[1].Speed,
|
||||
colliderRadius: colliderRadiusV[0],
|
||||
characterState: window.ATK_CHARACTER_STATE.InAirIdle1NoJump[0],
|
||||
@@ -135,6 +141,8 @@ cc.Class({
|
||||
velY: 0,
|
||||
inAir: true,
|
||||
onWall: false,
|
||||
hp: 100,
|
||||
maxHp: 100,
|
||||
}),
|
||||
],
|
||||
speciesIdList: speciesIdList,
|
||||
@@ -189,7 +197,7 @@ cc.Class({
|
||||
currSelfInput = null;
|
||||
const noDelayInputFrameId = gopkgs.ConvertToNoDelayInputFrameId(self.renderFrameId); // It's important that "inputDelayFrames == 0" here
|
||||
if (gopkgs.ShouldGenerateInputFrameUpsync(self.renderFrameId)) {
|
||||
const prevAndCurrInputs = self.getOrPrefabInputFrameUpsync(noDelayInputFrameId);
|
||||
const prevAndCurrInputs = self.getOrPrefabInputFrameUpsync(noDelayInputFrameId, true);
|
||||
prevSelfInput = prevAndCurrInputs[0];
|
||||
currSelfInput = prevAndCurrInputs[1];
|
||||
}
|
||||
|
@@ -229,7 +229,11 @@ window.initPersistentSessionClient = function(onopenCb, expectedRoomId) {
|
||||
const peerJoinIndex = resp.peerJoinIndex;
|
||||
const peerAddrList = resp.rdf.peerUdpAddrList;
|
||||
console.log(`Got DOWNSYNC_MSG_ACT_PEER_UDP_ADDR peerAddrList=${JSON.stringify(peerAddrList)}; boundRoomCapacity=${window.boundRoomCapacity}`);
|
||||
DelayNoMore.UdpSession.upsertPeerUdpAddr(peerAddrList, window.boundRoomCapacity, window.mapIns.selfPlayerInfo.JoinIndex); // In C++ impl it actually broadcasts the peer-punching message to all known peers within "window.boundRoomCapacity"
|
||||
for (let j = 0; j < 3; ++j) {
|
||||
setTimeout(()=> {
|
||||
DelayNoMore.UdpSession.upsertPeerUdpAddr(peerAddrList, window.boundRoomCapacity, window.mapIns.selfPlayerInfo.JoinIndex); // In C++ impl it actually broadcasts the peer-punching message to all known peers within "window.boundRoomCapacity"
|
||||
}, j*500);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -250,7 +254,8 @@ window.initPersistentSessionClient = function(onopenCb, expectedRoomId) {
|
||||
console.warn(`The WS clientSession is closed: evt=${JSON.stringify(evt)}, evt.code=${evt.code}`);
|
||||
if (cc.sys.isNative) {
|
||||
if (mapIns.frameDataLoggingEnabled) {
|
||||
console.warn(`${mapIns._stringifyRdfIdToActuallyUsedInput()}`);
|
||||
console.warn(`${mapIns._stringifyRdfIdToActuallyUsedInput()}
|
||||
`);
|
||||
}
|
||||
DelayNoMore.UdpSession.closeUdpSession();
|
||||
}
|
||||
@@ -260,7 +265,8 @@ window.initPersistentSessionClient = function(onopenCb, expectedRoomId) {
|
||||
case constants.RET_CODE.BATTLE_STOPPED:
|
||||
// deliberately do nothing
|
||||
if (mapIns.frameDataLoggingEnabled) {
|
||||
console.warn(`${mapIns._stringifyRdfIdToActuallyUsedInput()}`);
|
||||
console.warn(`${mapIns._stringifyRdfIdToActuallyUsedInput()}
|
||||
`);
|
||||
}
|
||||
break;
|
||||
case constants.RET_CODE.PLAYER_NOT_ADDABLE_TO_ROOM:
|
||||
@@ -277,7 +283,8 @@ window.initPersistentSessionClient = function(onopenCb, expectedRoomId) {
|
||||
case constants.RET_CODE.PLAYER_CHEATING:
|
||||
case 1006: // Peer(i.e. the backend) gone unexpectedly, but not working for "cc.sys.isNative"
|
||||
if (mapIns.frameDataLoggingEnabled) {
|
||||
console.warn(`${mapIns._stringifyRdfIdToActuallyUsedInput()}`);
|
||||
console.warn(`${mapIns._stringifyRdfIdToActuallyUsedInput()}
|
||||
`);
|
||||
}
|
||||
window.clearLocalStorageAndBackToLoginScene(true);
|
||||
break;
|
||||
@@ -335,7 +342,7 @@ window.initSecondarySession = function(onopenCb, boundRoomId) {
|
||||
//console.log(`Got non-empty onmessage decoded: resp.act=${resp.act}`);
|
||||
switch (resp.act) {
|
||||
case window.DOWNSYNC_MSG_ACT_PEER_INPUT_BATCH:
|
||||
mapIns.onPeerInputFrameUpsync(resp.peerJoinIndex, resp.inputFrameDownsyncBatch);
|
||||
mapIns.onPeerInputFrameUpsync(resp.peerJoinIndex, resp.inputFrameDownsyncBatch, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "40edd08e-316c-44b8-a50f-bd173554c554",
|
||||
"isPlugin": false,
|
||||
"uuid": "171e2c96-28b4-4225-bdcc-5e464f07d91a",
|
||||
"isPlugin": true,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
|
@@ -1220,6 +1220,8 @@ $root.protos = (function() {
|
||||
* @property {number|null} [onWallNormX] PlayerDownsync onWallNormX
|
||||
* @property {number|null} [onWallNormY] PlayerDownsync onWallNormY
|
||||
* @property {boolean|null} [capturedByInertia] PlayerDownsync capturedByInertia
|
||||
* @property {number|null} [revivalVirtualGridX] PlayerDownsync revivalVirtualGridX
|
||||
* @property {number|null} [revivalVirtualGridY] PlayerDownsync revivalVirtualGridY
|
||||
* @property {string|null} [name] PlayerDownsync name
|
||||
* @property {string|null} [displayName] PlayerDownsync displayName
|
||||
* @property {string|null} [avatar] PlayerDownsync avatar
|
||||
@@ -1472,6 +1474,22 @@ $root.protos = (function() {
|
||||
*/
|
||||
PlayerDownsync.prototype.capturedByInertia = false;
|
||||
|
||||
/**
|
||||
* PlayerDownsync revivalVirtualGridX.
|
||||
* @member {number} revivalVirtualGridX
|
||||
* @memberof protos.PlayerDownsync
|
||||
* @instance
|
||||
*/
|
||||
PlayerDownsync.prototype.revivalVirtualGridX = 0;
|
||||
|
||||
/**
|
||||
* PlayerDownsync revivalVirtualGridY.
|
||||
* @member {number} revivalVirtualGridY
|
||||
* @memberof protos.PlayerDownsync
|
||||
* @instance
|
||||
*/
|
||||
PlayerDownsync.prototype.revivalVirtualGridY = 0;
|
||||
|
||||
/**
|
||||
* PlayerDownsync name.
|
||||
* @member {string} name
|
||||
@@ -1578,6 +1596,10 @@ $root.protos = (function() {
|
||||
writer.uint32(/* id 28, wireType 0 =*/224).int32(message.onWallNormY);
|
||||
if (message.capturedByInertia != null && Object.hasOwnProperty.call(message, "capturedByInertia"))
|
||||
writer.uint32(/* id 29, wireType 0 =*/232).bool(message.capturedByInertia);
|
||||
if (message.revivalVirtualGridX != null && Object.hasOwnProperty.call(message, "revivalVirtualGridX"))
|
||||
writer.uint32(/* id 30, wireType 0 =*/240).int32(message.revivalVirtualGridX);
|
||||
if (message.revivalVirtualGridY != null && Object.hasOwnProperty.call(message, "revivalVirtualGridY"))
|
||||
writer.uint32(/* id 31, wireType 0 =*/248).int32(message.revivalVirtualGridY);
|
||||
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
||||
writer.uint32(/* id 997, wireType 2 =*/7978).string(message.name);
|
||||
if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
|
||||
@@ -1734,6 +1756,14 @@ $root.protos = (function() {
|
||||
message.capturedByInertia = reader.bool();
|
||||
break;
|
||||
}
|
||||
case 30: {
|
||||
message.revivalVirtualGridX = reader.int32();
|
||||
break;
|
||||
}
|
||||
case 31: {
|
||||
message.revivalVirtualGridY = reader.int32();
|
||||
break;
|
||||
}
|
||||
case 997: {
|
||||
message.name = reader.string();
|
||||
break;
|
||||
@@ -1868,6 +1898,12 @@ $root.protos = (function() {
|
||||
if (message.capturedByInertia != null && message.hasOwnProperty("capturedByInertia"))
|
||||
if (typeof message.capturedByInertia !== "boolean")
|
||||
return "capturedByInertia: boolean expected";
|
||||
if (message.revivalVirtualGridX != null && message.hasOwnProperty("revivalVirtualGridX"))
|
||||
if (!$util.isInteger(message.revivalVirtualGridX))
|
||||
return "revivalVirtualGridX: integer expected";
|
||||
if (message.revivalVirtualGridY != null && message.hasOwnProperty("revivalVirtualGridY"))
|
||||
if (!$util.isInteger(message.revivalVirtualGridY))
|
||||
return "revivalVirtualGridY: integer expected";
|
||||
if (message.name != null && message.hasOwnProperty("name"))
|
||||
if (!$util.isString(message.name))
|
||||
return "name: string expected";
|
||||
@@ -1950,6 +1986,10 @@ $root.protos = (function() {
|
||||
message.onWallNormY = object.onWallNormY | 0;
|
||||
if (object.capturedByInertia != null)
|
||||
message.capturedByInertia = Boolean(object.capturedByInertia);
|
||||
if (object.revivalVirtualGridX != null)
|
||||
message.revivalVirtualGridX = object.revivalVirtualGridX | 0;
|
||||
if (object.revivalVirtualGridY != null)
|
||||
message.revivalVirtualGridY = object.revivalVirtualGridY | 0;
|
||||
if (object.name != null)
|
||||
message.name = String(object.name);
|
||||
if (object.displayName != null)
|
||||
@@ -2002,6 +2042,8 @@ $root.protos = (function() {
|
||||
object.onWallNormX = 0;
|
||||
object.onWallNormY = 0;
|
||||
object.capturedByInertia = false;
|
||||
object.revivalVirtualGridX = 0;
|
||||
object.revivalVirtualGridY = 0;
|
||||
object.name = "";
|
||||
object.displayName = "";
|
||||
object.avatar = "";
|
||||
@@ -2064,6 +2106,10 @@ $root.protos = (function() {
|
||||
object.onWallNormY = message.onWallNormY;
|
||||
if (message.capturedByInertia != null && message.hasOwnProperty("capturedByInertia"))
|
||||
object.capturedByInertia = message.capturedByInertia;
|
||||
if (message.revivalVirtualGridX != null && message.hasOwnProperty("revivalVirtualGridX"))
|
||||
object.revivalVirtualGridX = message.revivalVirtualGridX;
|
||||
if (message.revivalVirtualGridY != null && message.hasOwnProperty("revivalVirtualGridY"))
|
||||
object.revivalVirtualGridY = message.revivalVirtualGridY;
|
||||
if (message.name != null && message.hasOwnProperty("name"))
|
||||
object.name = message.name;
|
||||
if (message.displayName != null && message.hasOwnProperty("displayName"))
|
||||
|
@@ -17,6 +17,12 @@
|
||||
"append_file": [{
|
||||
"from": "cocos/scripting/js-bindings/manual/jsb_module_register.cpp",
|
||||
"to": "frameworks/runtime-src/Classes/jsb_module_register.cpp"
|
||||
}, {
|
||||
"from": "frameworks/runtime-src/Classes/send_ring_buff.hpp",
|
||||
"to": "frameworks/runtime-src/Classes/send_ring_buff.hpp"
|
||||
}, {
|
||||
"from": "frameworks/runtime-src/Classes/send_ring_buff.cpp",
|
||||
"to": "frameworks/runtime-src/Classes/send_ring_buff.cpp"
|
||||
}, {
|
||||
"from": "frameworks/runtime-src/Classes/udp_session.hpp",
|
||||
"to": "frameworks/runtime-src/Classes/udp_session.hpp"
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "cocos2d.h"
|
||||
|
||||
#include "cocos/audio/include/AudioEngine.h"
|
||||
//#include "cocos/audio/include/AudioEngine.h"
|
||||
#include "cocos/scripting/js-bindings/manual/jsb_module_register.hpp"
|
||||
#include "cocos/scripting/js-bindings/manual/jsb_global.h"
|
||||
#include "cocos/scripting/js-bindings/jswrapper/SeApi.h"
|
||||
@@ -81,13 +81,13 @@ void AppDelegate::applicationDidEnterBackground()
|
||||
{
|
||||
EventDispatcher::dispatchEnterBackgroundEvent();
|
||||
// Ensure that handle AudioEngine enter background after all enter background events are handled
|
||||
AudioEngine::onEnterBackground();
|
||||
//AudioEngine::onEnterBackground();
|
||||
}
|
||||
|
||||
// this function will be called when the app is active again
|
||||
void AppDelegate::applicationWillEnterForeground()
|
||||
{
|
||||
// Ensure that handle AudioEngine enter foreground before all enter foreground events are handled
|
||||
AudioEngine::onEnterForeground();
|
||||
//AudioEngine::onEnterForeground();
|
||||
EventDispatcher::dispatchEnterForegroundEvent();
|
||||
}
|
||||
|
@@ -0,0 +1,102 @@
|
||||
#include <string.h>
|
||||
#include "send_ring_buff.hpp"
|
||||
|
||||
// Sending
|
||||
void SendRingBuff::put(BYTEC* const newBytes, size_t newBytesLen, PeerAddr* pNewPeerAddr) {
|
||||
while (0 < cnt && cnt >= n) {
|
||||
// Make room for the new element
|
||||
this->pop();
|
||||
}
|
||||
eles[ed].bytesLen = newBytesLen;
|
||||
memset(eles[ed].bytes, 0, sizeof eles[ed].bytes);
|
||||
memcpy(eles[ed].bytes, newBytes, newBytesLen);
|
||||
eles[ed].peerAddr = *(pNewPeerAddr);
|
||||
ed++;
|
||||
cnt++;
|
||||
if (ed >= n) {
|
||||
ed -= n; // Deliberately not using "%" operator for performance concern
|
||||
}
|
||||
}
|
||||
|
||||
SendWork* SendRingBuff::pop() {
|
||||
if (0 == cnt) {
|
||||
return NULL;
|
||||
}
|
||||
SendWork* ret = &(eles[st]);
|
||||
cnt--;
|
||||
st++;
|
||||
if (st >= n) {
|
||||
st -= n;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Recving
|
||||
void RecvRingBuff::put(char* newBytes, size_t newBytesLen) {
|
||||
RecvWork* slotEle = (&eles[ed.load()]); // Save for later update
|
||||
|
||||
int oldCnt = cnt.load();
|
||||
int oldSt = st.load(); // Used to guard against "cnt decremented in pop(...), but st not yet incremented and thus return value not yet copied to avoid contamination"
|
||||
int tried = 0;
|
||||
while (n <= oldCnt && !ed.compare_exchange_weak(oldSt, oldSt) && 3 > tried) {
|
||||
// Make room for the new element
|
||||
this->pop(NULL);
|
||||
oldCnt = cnt.load(); // If "pop()" above failed, it'd only be due to concurrent calls to "pop()", either way the updated "cnt" should be good to go
|
||||
oldSt = st.load();
|
||||
++tried;
|
||||
}
|
||||
if (n <= oldCnt && !ed.compare_exchange_weak(oldSt, oldSt) && 3 == tried) {
|
||||
// Failed silently, UDP packet can be dropped.
|
||||
return;
|
||||
}
|
||||
slotEle->bytesLen = newBytesLen;
|
||||
memset(slotEle->ui8Arr, 0, sizeof slotEle->ui8Arr);
|
||||
for (int i = 0; i < newBytesLen; i++) {
|
||||
*(slotEle->ui8Arr + i) = *(newBytes + i);
|
||||
}
|
||||
|
||||
// No need to compare-and-swap, only "UvRecvThread" will access "RecvRingBuff.ed".
|
||||
ed++;
|
||||
if (ed >= n) {
|
||||
ed -= n; // Deliberately not using "%" operator for performance concern
|
||||
}
|
||||
|
||||
// Only increment cnt when the putting of new element is fully done.
|
||||
cnt++;
|
||||
}
|
||||
|
||||
bool RecvRingBuff::pop(RecvWork* out) {
|
||||
int oldCnt = std::atomic_fetch_sub(&cnt, 1);
|
||||
/*
|
||||
[WARNING]
|
||||
|
||||
After here, two cases should be taken care of.
|
||||
1. If "n == oldCnt", we need guard against "put" to avoid contaminating "ret" by the "putting".
|
||||
2. If "0 >= oldCnt", we need guard against another "pop" to avoid over-popping.
|
||||
*/
|
||||
if (0 >= oldCnt) {
|
||||
// "pop" could be accessed by either "GameThread/pollUdpRecvRingBuff" or "UvRecvThread/put", thus we should be proactively guard against concurrent popping while "1 == cnt"
|
||||
++cnt;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// When concurrent "pop"s reach here, over-popping is definitely avoided.
|
||||
int oldSt = st.load();
|
||||
if (out) {
|
||||
RecvWork* src = (&eles[oldSt]);
|
||||
memset(out->ui8Arr, 0, sizeof out->ui8Arr);
|
||||
memcpy(out->ui8Arr, src, src->bytesLen);
|
||||
out->bytesLen = src->bytesLen;
|
||||
}
|
||||
int newSt = oldSt + 1;
|
||||
if (newSt >= n) {
|
||||
newSt -= n;
|
||||
}
|
||||
if (st.compare_exchange_weak(oldSt, newSt)) {
|
||||
return true;
|
||||
} else {
|
||||
// Failed concurrent access should recover the "cnt"
|
||||
++cnt;
|
||||
return false;
|
||||
}
|
||||
}
|
@@ -0,0 +1,74 @@
|
||||
#ifndef send_ring_buff_hpp
|
||||
#define send_ring_buff_hpp
|
||||
|
||||
#include "uv/uv.h"
|
||||
#define __SSIZE_T // Otherwise "ssize_t" would have conflicting macros error that stops compiling
|
||||
|
||||
#include <atomic>
|
||||
|
||||
int const RING_BUFF_CONSECUTIVE_SET = 0;
|
||||
int const RING_BUFF_NON_CONSECUTIVE_SET = 1;
|
||||
int const RING_BUFF_FAILED_TO_SET = 2;
|
||||
|
||||
typedef char BYTEC;
|
||||
typedef char const CHARC;
|
||||
int const maxUdpPayloadBytes = 128;
|
||||
int const maxBuffedMsgs = 512;
|
||||
|
||||
struct PeerAddr {
|
||||
struct sockaddr_in sockAddrIn;
|
||||
uint32_t authKey;
|
||||
};
|
||||
|
||||
class SendWork {
|
||||
public:
|
||||
BYTEC bytes[maxUdpPayloadBytes]; // Wasting some RAM here thus no need for explicit recursive destruction
|
||||
size_t bytesLen;
|
||||
PeerAddr peerAddr;
|
||||
};
|
||||
|
||||
// [WARNING] This class is specific to "SendWork", designed and implemented only to use in multithreading env and save heap alloc/dealloc timecomplexity, it's by no means comparable to the Golang or JavaScript versions!
|
||||
class SendRingBuff {
|
||||
public:
|
||||
int ed, st, n, cnt;
|
||||
SendWork eles[maxBuffedMsgs]; // preallocated on stack to save heap alloc/dealloc time
|
||||
SendRingBuff(int newN) {
|
||||
this->n = newN;
|
||||
this->st = this->ed = this->cnt = 0;
|
||||
}
|
||||
|
||||
void put(BYTEC* const newBytes, size_t newBytesLen, PeerAddr* pNewPeerAddr);
|
||||
|
||||
// Sending is always sequential in UvSendThread, no need to return a copy of "SendWork" instance
|
||||
SendWork* pop();
|
||||
};
|
||||
|
||||
// TODO: Move "RecvXxxx" to a dedicated class.
|
||||
class RecvWork {
|
||||
public:
|
||||
uint8_t ui8Arr[maxUdpPayloadBytes]; // Wasting some RAM here thus no need for explicit recursive destruction
|
||||
size_t bytesLen;
|
||||
};
|
||||
|
||||
/*
|
||||
[WARNING] This class is specific to "RecvWork"; its "put" and "pop" methods are designed to be thread-safe & lock-free for our particular case, i.e. only concurrent access from "UvRecvThread" & "GameThread", in a sense more sophisticated than the Golang or JavaScript versions.
|
||||
|
||||
There's yet no plan to support thread-safe & lock-free "getByFrameId/setByFrameId" -- being thread-safe is easy by use of mutex, which is very SLOWWWWW when used in 60fps race-conditions.
|
||||
|
||||
The generic "thread-safe, lock-free ring buffer or circular buffer" is a big problem, widely discussed over the internet and in literatures, search "lock-free circular buffer" for more information.
|
||||
*/
|
||||
class RecvRingBuff {
|
||||
public:
|
||||
int n;
|
||||
std::atomic_int ed, st, cnt;
|
||||
RecvWork eles[maxBuffedMsgs]; // preallocated on stack to save heap alloc/dealloc time
|
||||
RecvRingBuff(int newN) {
|
||||
this->n = newN;
|
||||
this->st = this->ed = this->cnt = 0;
|
||||
}
|
||||
|
||||
void put(char* newBytes, size_t newBytesLen);
|
||||
|
||||
bool pop(RecvWork* out);
|
||||
};
|
||||
#endif
|
@@ -4,18 +4,27 @@
|
||||
#include "cocos/base/CCScheduler.h"
|
||||
#include "cocos/scripting/js-bindings/jswrapper/SeApi.h"
|
||||
|
||||
uv_udp_t* udpSocket = NULL;
|
||||
uv_thread_t recvTid;
|
||||
uv_timer_t peerPunchTimer;
|
||||
uv_async_t uvLoopStopSig;
|
||||
uv_loop_t* loop = NULL; // Only this loop is used for this simple PoC
|
||||
int const punchServerCnt = 3;
|
||||
int const punchPeerCnt = 3;
|
||||
int const broadcastUpsyncCnt = 2;
|
||||
|
||||
struct PeerAddr peerAddrList[maxPeerCnt];
|
||||
uv_udp_t *udpRecvSocket = NULL, *udpSendSocket = NULL;
|
||||
uv_thread_t recvTid, sendTid;
|
||||
uv_async_t uvRecvLoopStopSig, uvSendLoopStopSig, uvSendLoopTriggerSig;
|
||||
uv_loop_t *recvLoop = NULL, *sendLoop = NULL;
|
||||
|
||||
uv_mutex_t sendRingBuffLock; // used along with "uvSendLoopTriggerSig" as a "uv_cond_t"
|
||||
SendRingBuff* sendRingBuff = NULL;
|
||||
|
||||
uv_mutex_t recvRingBuffLock;
|
||||
RecvRingBuff* recvRingBuff = NULL;
|
||||
|
||||
char SRV_IP[256];
|
||||
int SRV_PORT = 0;
|
||||
int UDP_TUNNEL_SRV_PORT = 0;
|
||||
struct PeerAddr udpTunnelAddr;
|
||||
struct PeerAddr udpPunchingServerAddr, udpTunnelAddr;
|
||||
struct PeerAddr peerAddrList[maxPeerCnt];
|
||||
bool peerPunchedMarks[maxPeerCnt];
|
||||
|
||||
void _onRead(uv_udp_t* req, ssize_t nread, uv_buf_t const* buf, struct sockaddr const* addr, unsigned flags) {
|
||||
if (nread < 0) {
|
||||
@@ -24,6 +33,9 @@ void _onRead(uv_udp_t* req, ssize_t nread, uv_buf_t const* buf, struct sockaddr
|
||||
free(buf->base);
|
||||
return;
|
||||
}
|
||||
struct sockaddr_in const* sockAddr = (struct sockaddr_in const*)addr;
|
||||
|
||||
#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0)
|
||||
char ip[INET_ADDRSTRLEN];
|
||||
memset(ip, 0, sizeof ip);
|
||||
int port = 0;
|
||||
@@ -32,52 +44,37 @@ void _onRead(uv_udp_t* req, ssize_t nread, uv_buf_t const* buf, struct sockaddr
|
||||
// The null check for "addr" is necessary, on Android there'd be such mysterious call to "_onRead"!
|
||||
switch (addr->sa_family) {
|
||||
case AF_INET: {
|
||||
struct sockaddr_in const* sockAddr = (struct sockaddr_in const*)addr;
|
||||
uv_inet_ntop(sockAddr->sin_family, &(sockAddr->sin_addr), ip, INET_ADDRSTRLEN);
|
||||
port = ntohs(sockAddr->sin_port);
|
||||
//CCLOG("UDP received %d bytes from %s:%d", nread, ip, port);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
CCLOG("UDP received %d bytes from unknown sender", nread);
|
||||
CCLOG("UDP received %u bytes from unknown sender", nread);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (6 == nread) {
|
||||
// holepunching
|
||||
} else if (0 < nread) {
|
||||
// Non-holepunching; it might be more effective in RAM usage to use a threadsafe RingBuff to pass msg to GameThread here, but as long as it's not a performance blocker don't bother optimize here...
|
||||
uint8_t* const ui8Arr = (uint8_t*)malloc(maxUdpPayloadBytes*sizeof(uint8_t));
|
||||
memset(ui8Arr, 0, sizeof ui8Arr);
|
||||
for (int i = 0; i < nread; i++) {
|
||||
*(ui8Arr+i) = *(buf->base + i);
|
||||
// Peer holepunching
|
||||
for (int i = 0; i < maxPeerCnt; i++) {
|
||||
if (peerAddrList[i].sockAddrIn.sin_addr.s_addr != sockAddr->sin_addr.s_addr) continue;
|
||||
if (peerAddrList[i].sockAddrIn.sin_port != sockAddr->sin_port) continue;
|
||||
peerPunchedMarks[i] = true;
|
||||
#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0)
|
||||
CCLOG("UDP received peer-holepunching from %s:%d", ip, port);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
cocos2d::Application::getInstance()->getScheduler()->performFunctionInCocosThread([=]() {
|
||||
// [WARNING] Use of the "ScriptEngine" is only allowed in "GameThread a.k.a. CocosThread"!
|
||||
se::Value onUdpMessageCb;
|
||||
se::ScriptEngine::getInstance()->getGlobalObject()->getProperty("onUdpMessage", &onUdpMessageCb);
|
||||
// [WARNING] Declaring "AutoHandleScope" is critical here, otherwise "onUdpMessageCb.toObject()" wouldn't be recognized as a function of the ScriptEngine!
|
||||
se::AutoHandleScope hs;
|
||||
//CCLOG("UDP received %d bytes upsync -- 1", nread);
|
||||
se::Object* const gameThreadMsg = se::Object::createTypedArray(se::Object::TypedArrayType::UINT8, ui8Arr, nread);
|
||||
//CCLOG("UDP received %d bytes upsync -- 2", nread);
|
||||
se::ValueArray args = { se::Value(gameThreadMsg) };
|
||||
if (onUdpMessageCb.isObject() && onUdpMessageCb.toObject()->isFunction()) {
|
||||
// Temporarily assume that the "this" ptr within callback is NULL.
|
||||
bool ok = onUdpMessageCb.toObject()->call(args, NULL);
|
||||
if (!ok) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
}
|
||||
//CCLOG("UDP received %d bytes upsync -- 3", nread);
|
||||
gameThreadMsg->decRef(); // Reference http://docs.cocos.com/creator/2.2/manual/en/advanced-topics/JSB2.0-learning.html#seobject
|
||||
//CCLOG("UDP received %d bytes upsync -- 4", nread);
|
||||
free(ui8Arr);
|
||||
CCLOG("UDP received %d bytes upsync -- 5", nread);
|
||||
|
||||
});
|
||||
} else if (0 < nread) {
|
||||
// Non-holepunching; the previously used "cocos2d::Application::getInstance()->getScheduler()->performFunctionInCocosThread(...)" approach was so non-deterministic in terms of the lag till GameThread actually recognizes this latest received packet due to scheduler uncertainty -- and was also heavier in RAM due to lambda usage
|
||||
#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0)
|
||||
CCLOG("UDP received %u bytes inputFrameUpsync from %s:%d", nread, ip, port);
|
||||
#endif
|
||||
//uv_mutex_lock(&recvRingBuffLock);
|
||||
recvRingBuff->put(buf->base, nread);
|
||||
//uv_mutex_unlock(&recvRingBuffLock);
|
||||
}
|
||||
free(buf->base);
|
||||
|
||||
@@ -95,198 +92,56 @@ static void _allocBuffer(uv_handle_t* handle, size_t suggested_size, uv_buf_t* b
|
||||
}
|
||||
|
||||
void _onUvStopSig(uv_async_t* handle) {
|
||||
uv_stop(loop);
|
||||
CCLOG("UDP recv loop is signaled to stop in UvThread");
|
||||
if (!handle) return;
|
||||
uv_stop(handle->loop);
|
||||
CCLOG("UDP loop %p is signaled to stop in UvXxxxThread", handle->loop);
|
||||
}
|
||||
|
||||
void _onSend(uv_udp_send_t* req, int status) {
|
||||
CCLOG("UDP send about to free req for status:%d...", status);
|
||||
free(req); // No need to free "req->base", it'll be handled in each "_afterXxx" callback
|
||||
CCLOG("UDP send freed req for status:%d...", status);
|
||||
void _afterSend(uv_udp_send_t* req, int status) {
|
||||
if (req) {
|
||||
free(req);
|
||||
}
|
||||
if (status) {
|
||||
CCLOGERROR("uv_udp_send_cb error: %s\n", uv_strerror(status));
|
||||
}
|
||||
}
|
||||
|
||||
void _onUvTimerClosed(uv_handle_t* timer) {
|
||||
free(timer);
|
||||
}
|
||||
|
||||
int const punchServerCnt = 3;
|
||||
class PunchServerWork {
|
||||
public:
|
||||
BYTEC bytes[maxUdpPayloadBytes]; // Wasting some RAM here thus no need for explicit recursive destruction
|
||||
size_t bytesLen;
|
||||
|
||||
BYTEC udpTunnelBytes[maxUdpPayloadBytes];
|
||||
size_t udpTunnelBytesLen;
|
||||
|
||||
PunchServerWork(BYTEC* const newBytes, size_t newBytesLen, BYTEC* const newUdpTunnelBytes, size_t newUdpTunnelBytesLen) {
|
||||
memset(this->bytes, 0, sizeof(this->bytes));
|
||||
memcpy(this->bytes, newBytes, newBytesLen);
|
||||
|
||||
this->bytesLen = newBytesLen;
|
||||
|
||||
memset(this->udpTunnelBytes, 0, sizeof(this->udpTunnelBytes));
|
||||
memcpy(this->udpTunnelBytes, newUdpTunnelBytes, newUdpTunnelBytesLen);
|
||||
|
||||
this->udpTunnelBytesLen = newUdpTunnelBytesLen;
|
||||
}
|
||||
};
|
||||
void _punchServerOnUvThread(uv_work_t* wrapper) {
|
||||
PunchServerWork* work = (PunchServerWork*)wrapper->data;
|
||||
for (int i = 0; i < punchServerCnt; i++) {
|
||||
uv_udp_send_t* req = (uv_udp_send_t*)malloc(sizeof(uv_udp_send_t));
|
||||
uv_buf_t sendBuffer = uv_buf_init(work->bytes, work->bytesLen);
|
||||
struct sockaddr_in destAddr;
|
||||
uv_ip4_addr(SRV_IP, SRV_PORT, &destAddr);
|
||||
uv_udp_send(req, udpSocket, &sendBuffer, 1, (struct sockaddr const*)&destAddr, _onSend);
|
||||
|
||||
uv_udp_send_t* udpTunnelReq = (uv_udp_send_t*)malloc(sizeof(uv_udp_send_t));
|
||||
uv_buf_t udpTunnelSendBuffer = uv_buf_init(work->udpTunnelBytes, work->udpTunnelBytesLen);
|
||||
struct sockaddr_in udpTunnelDestAddr;
|
||||
uv_ip4_addr(SRV_IP, UDP_TUNNEL_SRV_PORT, &udpTunnelDestAddr);
|
||||
udpTunnelAddr.sockAddrIn = udpTunnelDestAddr;
|
||||
uv_udp_send(udpTunnelReq, udpSocket, &udpTunnelSendBuffer, 1, (struct sockaddr const*)&udpTunnelDestAddr, _onSend);
|
||||
}
|
||||
}
|
||||
void _afterPunchServer(uv_work_t* wrapper, int status) {
|
||||
CCLOG("UDP send about to free PunchServerWork for status:%d...", status);
|
||||
PunchServerWork* work = (PunchServerWork*)wrapper->data;
|
||||
delete work;
|
||||
CCLOG("UDP freed PunchServerWork for status:%d...", status);
|
||||
}
|
||||
|
||||
class PunchPeerWork {
|
||||
public:
|
||||
int roomCapacity;
|
||||
int selfJoinIndex;
|
||||
int naiveRefCnt;
|
||||
PunchPeerWork(int newRoomCapacity, int newSelfJoinIndex) {
|
||||
this->roomCapacity = newRoomCapacity;
|
||||
this->selfJoinIndex = newSelfJoinIndex;
|
||||
this->naiveRefCnt = 0;
|
||||
}
|
||||
void refInc() {
|
||||
++this->naiveRefCnt;
|
||||
}
|
||||
void refDecAndDelIfZero() {
|
||||
--this->naiveRefCnt;
|
||||
if (0 >= this->naiveRefCnt) {
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
virtual ~PunchPeerWork() {
|
||||
CCLOG("PunchPeerWork instance deleted...");
|
||||
}
|
||||
};
|
||||
void _punchPeerOnUvThreadDelayed(uv_timer_t* timer, int status) {
|
||||
//CCLOG("_punchPeerOnUvThreadDelayed started...");
|
||||
PunchPeerWork* work = (PunchPeerWork*)timer->data;
|
||||
int roomCapacity = work->roomCapacity;
|
||||
int selfJoinIndex = work->selfJoinIndex;
|
||||
|
||||
for (int i = 0; i < roomCapacity; i++) {
|
||||
if (i + 1 == selfJoinIndex) {
|
||||
continue;
|
||||
}
|
||||
if (0 == peerAddrList[i].sockAddrIn.sin_port) {
|
||||
// Peer addr not initialized
|
||||
continue;
|
||||
}
|
||||
//CCLOG("UDP about to punch peer joinIndex:%d", i);
|
||||
char peerIp[17] = { 0 };
|
||||
uv_ip4_name((struct sockaddr_in*)&(peerAddrList[i].sockAddrIn), peerIp, sizeof peerIp);
|
||||
int peerPortSt = ntohs(peerAddrList[i].sockAddrIn.sin_port);
|
||||
int peerPortEd = ntohs(peerAddrList[i].sockAddrIn.sin_port) + 1; // Use tunnel of backend instead of sweeping ports blindly!
|
||||
for (int peerPort = peerPortSt; peerPort < peerPortEd; peerPort++) {
|
||||
if (0 > peerPort) continue;
|
||||
uv_udp_send_t* req = (uv_udp_send_t*)malloc(sizeof(uv_udp_send_t));
|
||||
uv_buf_t sendBuffer = uv_buf_init("foobar", 6); // hardcoded for now
|
||||
struct sockaddr_in testPeerAddr;
|
||||
uv_ip4_addr(peerIp, peerPort, &testPeerAddr);
|
||||
uv_udp_send(req, udpSocket, &sendBuffer, 1, (struct sockaddr const*)&testPeerAddr, _onSend);
|
||||
CCLOG("UDP punched peer %s:%d by 6 bytes", peerIp, peerPort);
|
||||
}
|
||||
}
|
||||
uv_timer_stop(timer);
|
||||
uv_close((uv_handle_t*)timer, _onUvTimerClosed);
|
||||
//CCLOG("_punchPeerOnUvThreadDelayed stopped...");
|
||||
work->refDecAndDelIfZero();
|
||||
}
|
||||
int const punchPeerCnt = 3;
|
||||
void _startPunchPeerTimerOnUvThread(uv_work_t* wrapper) {
|
||||
PunchPeerWork* work = (PunchPeerWork*)wrapper->data;
|
||||
int roomCapacity = work->roomCapacity;
|
||||
int selfJoinIndex = work->selfJoinIndex;
|
||||
|
||||
for (int j = 0; j < punchPeerCnt; j++) {
|
||||
work->refInc();
|
||||
}
|
||||
for (int j = 0; j < punchPeerCnt; j++) {
|
||||
uv_timer_t* punchTimer = (uv_timer_t*)malloc(sizeof(uv_timer_t)); // I don't think libuv timer is safe to be called from GameThread, thus calling it within UvThread here
|
||||
uv_timer_init(loop, punchTimer);
|
||||
punchTimer->data = work;
|
||||
uv_timer_start(punchTimer, (uv_timer_cb)&_punchPeerOnUvThreadDelayed, j * 500, 0);
|
||||
}
|
||||
}
|
||||
void _afterPunchPeerTimerStarted(uv_work_t* wrapper, int status) {
|
||||
// RAM of PunchPeerWork handled by "naiveRefCnt"
|
||||
}
|
||||
|
||||
class BroadcastInputFrameUpsyncWork {
|
||||
public:
|
||||
BYTEC bytes[maxUdpPayloadBytes]; // Wasting some RAM here thus no need for explicit recursive destruction
|
||||
size_t bytesLen;
|
||||
int roomCapacity;
|
||||
int selfJoinIndex;
|
||||
|
||||
BroadcastInputFrameUpsyncWork(BYTEC* const newBytes, size_t newBytesLen, int newRoomCapacity, int newSelfJoinIndex) {
|
||||
memset(this->bytes, 0, sizeof(this->bytes));
|
||||
memcpy(this->bytes, newBytes, newBytesLen);
|
||||
|
||||
this->bytesLen = newBytesLen;
|
||||
|
||||
this->roomCapacity = newRoomCapacity;
|
||||
this->selfJoinIndex = newSelfJoinIndex;
|
||||
}
|
||||
};
|
||||
int const broadcastUpsyncCnt = 1;
|
||||
void _broadcastInputFrameUpsyncOnUvThread(uv_work_t* wrapper) {
|
||||
BroadcastInputFrameUpsyncWork* work = (BroadcastInputFrameUpsyncWork*)wrapper->data;
|
||||
int roomCapacity = work->roomCapacity;
|
||||
int selfJoinIndex = work->selfJoinIndex;
|
||||
// Send to room udp tunnel in case of hole punching failure
|
||||
for (int j = 0; j < broadcastUpsyncCnt; j++) {
|
||||
uv_udp_send_t* req = (uv_udp_send_t*)malloc(sizeof(uv_udp_send_t));
|
||||
uv_buf_t sendBuffer = uv_buf_init(work->bytes, work->bytesLen);
|
||||
uv_udp_send(req, udpSocket, &sendBuffer, 1, (struct sockaddr const*)&(udpTunnelAddr.sockAddrIn), _onSend);
|
||||
CCLOG("UDP sent upsync to udp tunnel %s:%d by %u bytes round-%d", SRV_IP, UDP_TUNNEL_SRV_PORT, work->bytesLen, j);
|
||||
}
|
||||
void _onUvSthNewToSend(uv_async_t* handle) {
|
||||
|
||||
for (int i = 0; i < roomCapacity; i++) {
|
||||
if (i + 1 == selfJoinIndex) {
|
||||
continue;
|
||||
bool hasNext = true;
|
||||
while (NULL != handle && true == hasNext) {
|
||||
SendWork* work = NULL;
|
||||
uv_mutex_lock(&sendRingBuffLock);
|
||||
work = sendRingBuff->pop();
|
||||
|
||||
if (NULL == work) {
|
||||
hasNext = false;
|
||||
}
|
||||
if (0 == peerAddrList[i].sockAddrIn.sin_port) {
|
||||
// Peer addr not initialized
|
||||
continue;
|
||||
}
|
||||
char peerIp[17] = { 0 };
|
||||
uv_ip4_name((struct sockaddr_in*)&(peerAddrList[i].sockAddrIn), peerIp, sizeof peerIp);
|
||||
// Might want to send several times for better arrival rate
|
||||
for (int j = 0; j < broadcastUpsyncCnt; j++) {
|
||||
/*
|
||||
[WARNING] The following "uv_udp_try_send" might block I / O for a long time, hence unlock "as soon as possible" to avoid blocking the "GameThread" which is awaiting to acquire this mutex!
|
||||
|
||||
There's a very small chance where "sendRingBuff->put(...)" could contaminate the just popped "work" in "sendRingBuff->eles", thus "sendRingBuff->n" is made quite large to avoid that, moreover in terms of protecting "work" we're also unlocking "as late as possible"!
|
||||
*/
|
||||
uv_mutex_unlock(&sendRingBuffLock);
|
||||
if (NULL != work) {
|
||||
|
||||
// [WARNING] If "uv_udp_send" is to be used instead of "uv_udp_try_send", as UvSendThread will always be terminated from GameThread, it's a MUST to use the following heap-alloc form to initialize "uv_udp_send_t* req" such that "_afterSend" is guaranteed to be called, otherwise "int uvRunRet2 = uv_run(l, UV_RUN_DEFAULT);" for UvSendThread would block forever due to residual active handles.
|
||||
|
||||
uv_udp_send_t* req = (uv_udp_send_t*)malloc(sizeof(uv_udp_send_t));
|
||||
uv_buf_t sendBuffer = uv_buf_init(work->bytes, work->bytesLen);
|
||||
uv_udp_send(req, udpSocket, &sendBuffer, 1, (struct sockaddr const*)&(peerAddrList[i].sockAddrIn), _onSend);
|
||||
CCLOG("UDP broadcasted upsync to peer %s:%d by %u bytes round-%d", peerIp, ntohs(peerAddrList[i].sockAddrIn.sin_port), work->bytesLen, j);
|
||||
uv_udp_send(req, udpSendSocket, &sendBuffer, 1, (struct sockaddr const*)&(work->peerAddr.sockAddrIn), _afterSend);
|
||||
|
||||
//uv_buf_t sendBuffer = uv_buf_init(work->bytes, work->bytesLen);
|
||||
//uv_udp_try_send(udpSendSocket, &sendBuffer, 1, (struct sockaddr const*)&(work->peerAddr.sockAddrIn));
|
||||
#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0)
|
||||
char ip[INET_ADDRSTRLEN];
|
||||
memset(ip, 0, sizeof ip);
|
||||
uv_inet_ntop(work->peerAddr.sockAddrIn.sin_family, &(work->peerAddr.sockAddrIn.sin_addr), ip, INET_ADDRSTRLEN);
|
||||
int port = ntohs(work->peerAddr.sockAddrIn.sin_port);
|
||||
CCLOG("UDP sent %d bytes to %s:%d", sendBuffer.len, ip, port);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
void _afterBroadcastInputFrameUpsync(uv_work_t* wrapper, int status) {
|
||||
BroadcastInputFrameUpsyncWork* work = (BroadcastInputFrameUpsyncWork*)wrapper->data;
|
||||
delete work;
|
||||
}
|
||||
|
||||
void _onWalkCleanup(uv_handle_t* handle, void* data) {
|
||||
@@ -297,35 +152,94 @@ void _onWalkCleanup(uv_handle_t* handle, void* data) {
|
||||
void startRecvLoop(void* arg) {
|
||||
uv_loop_t* l = (uv_loop_t*)arg;
|
||||
int uvRunRet1 = uv_run(l, UV_RUN_DEFAULT);
|
||||
CCLOG("UDP recv loop is ended in UvThread, uvRunRet1=%d", uvRunRet1);
|
||||
CCLOG("UDP recv loop is ended in UvRecvThread, uvRunRet1=%d", uvRunRet1);
|
||||
uv_walk(l, _onWalkCleanup, NULL);
|
||||
CCLOG("UDP recv loop is walked in UvRecvThread");
|
||||
int uvRunRet2 = uv_run(l, UV_RUN_DEFAULT);
|
||||
CCLOG("UDP recv loop is run after walking in UvRecvThread, uvRunRet2=%d", uvRunRet2);
|
||||
|
||||
int uvCloseRet = uv_loop_close(l);
|
||||
CCLOG("UDP recv loop is closed in UvThread, uvRunRet2=%d, uvCloseRet=%d", uvRunRet2, uvCloseRet);
|
||||
CCLOG("UDP recv loop is closed in UvRecvThread, uvCloseRet=%d", uvCloseRet);
|
||||
uv_mutex_destroy(&recvRingBuffLock);
|
||||
}
|
||||
|
||||
void startSendLoop(void* arg) {
|
||||
uv_loop_t* l = (uv_loop_t*)arg;
|
||||
int uvRunRet1 = uv_run(l, UV_RUN_DEFAULT);
|
||||
CCLOG("UDP send loop is ended in UvSendThread, uvRunRet1=%d", uvRunRet1);
|
||||
uv_walk(l, _onWalkCleanup, NULL);
|
||||
CCLOG("UDP send loop is walked in UvSendThread");
|
||||
int uvRunRet2 = uv_run(l, UV_RUN_DEFAULT);
|
||||
CCLOG("UDP send loop is run after walking in UvSendThread, uvRunRet2=%d", uvRunRet2);
|
||||
|
||||
int uvCloseRet = uv_loop_close(l);
|
||||
CCLOG("UDP send loop is closed in UvSendThread, uvCloseRet=%d", uvCloseRet);
|
||||
uv_mutex_destroy(&sendRingBuffLock);
|
||||
}
|
||||
|
||||
int initSendLoop(struct sockaddr const* pUdpAddr) {
|
||||
sendLoop = uv_loop_new();
|
||||
udpSendSocket = (uv_udp_t*)malloc(sizeof(uv_udp_t));
|
||||
int sendSockInitRes = uv_udp_init(sendLoop, udpSendSocket); // "uv_udp_init" must precede that of "uv_udp_bind" for successful binding!
|
||||
int sendBindRes = uv_udp_bind(udpSendSocket, pUdpAddr, UV_UDP_REUSEADDR);
|
||||
if (0 != sendBindRes) {
|
||||
CCLOGERROR("Failed to bind send; sendSockInitRes=%d, sendBindRes=%d, reason=%s", sendSockInitRes, sendBindRes, uv_strerror(sendBindRes));
|
||||
exit(-1);
|
||||
}
|
||||
uv_mutex_init(&sendRingBuffLock);
|
||||
sendRingBuff = new SendRingBuff(maxBuffedMsgs);
|
||||
|
||||
uv_mutex_init(&recvRingBuffLock);
|
||||
recvRingBuff = new RecvRingBuff(maxBuffedMsgs);
|
||||
|
||||
uv_async_init(sendLoop, &uvSendLoopStopSig, _onUvStopSig);
|
||||
uv_async_init(sendLoop, &uvSendLoopTriggerSig, _onUvSthNewToSend);
|
||||
|
||||
return sendBindRes;
|
||||
}
|
||||
|
||||
bool initRecvLoop(struct sockaddr const* pUdpAddr) {
|
||||
recvLoop = uv_loop_new();
|
||||
udpRecvSocket = (uv_udp_t*)malloc(sizeof(uv_udp_t));
|
||||
|
||||
int recvSockInitRes = uv_udp_init(recvLoop, udpRecvSocket);
|
||||
int recvbindRes = uv_udp_bind(udpRecvSocket, pUdpAddr, UV_UDP_REUSEADDR);
|
||||
if (0 != recvbindRes) {
|
||||
CCLOGERROR("Failed to bind recv; recvSockInitRes=%d, recvbindRes=%d, reason=%s", recvSockInitRes, recvbindRes, uv_strerror(recvbindRes));
|
||||
exit(-1);
|
||||
}
|
||||
uv_udp_recv_start(udpRecvSocket, _allocBuffer, _onRead);
|
||||
uv_async_init(recvLoop, &uvRecvLoopStopSig, _onUvStopSig);
|
||||
|
||||
return recvbindRes;
|
||||
}
|
||||
|
||||
bool DelayNoMore::UdpSession::openUdpSession(int port) {
|
||||
loop = uv_loop_new();
|
||||
udpSocket = (uv_udp_t*)malloc(sizeof(uv_udp_t));
|
||||
struct sockaddr_in udpAddr;
|
||||
uv_ip4_addr("0.0.0.0", port, &udpAddr);
|
||||
struct sockaddr const* pUdpAddr = (struct sockaddr const*)&udpAddr;
|
||||
|
||||
int sockInitRes = uv_udp_init(loop, udpSocket); // "uv_udp_init" must precede that of "uv_udp_bind" for successful binding!
|
||||
|
||||
struct sockaddr_in recv_addr;
|
||||
uv_ip4_addr("0.0.0.0", port, &recv_addr);
|
||||
int bindRes = uv_udp_bind(udpSocket, (struct sockaddr const*)&recv_addr, UV_UDP_REUSEADDR);
|
||||
if (0 != bindRes) {
|
||||
CCLOGERROR("Failed to bind port=%d; bind result=%d, reason=%s", port, bindRes, uv_strerror(bindRes));
|
||||
exit(-1);
|
||||
memset(peerPunchedMarks, false, sizeof(peerPunchedMarks));
|
||||
for (int i = 0; i < maxPeerCnt; i++) {
|
||||
peerAddrList[i].authKey = -1; // hardcoded for now
|
||||
memset((char*)&peerAddrList[i].sockAddrIn, 0, sizeof(peerAddrList[i].sockAddrIn));
|
||||
}
|
||||
/*
|
||||
[WARNING] On Android, the libuv documentation of "UV_UDP_REUSEADDR" is true, i.e. only the socket that binds later on the same port will be triggered the recv callback; however on Windows, experiment shows that the exact reverse is true instead.
|
||||
|
||||
uv_async_init(loop, &uvLoopStopSig, _onUvStopSig);
|
||||
It's feasible to use a same socket instance for both receiving and sending in different threads, however not knowing the exact thread-safety concerns for "uv_udp_send/uv_udp_try_send" & "uv recv callback" stops me from doing so, I'd prefer to stick to using different socket instances in different threads.
|
||||
*/
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
|
||||
initSendLoop(pUdpAddr);
|
||||
initRecvLoop(pUdpAddr);
|
||||
#else
|
||||
initRecvLoop(pUdpAddr);
|
||||
initSendLoop(pUdpAddr);
|
||||
#endif
|
||||
CCLOG("About to open UDP session at port=%d; recvLoop=%p, sendLoop=%p...", port, recvLoop, sendLoop);
|
||||
|
||||
CCLOG("About to open UDP session at port=%d; bind result=%d, sock init result=%d...", port, bindRes, sockInitRes);
|
||||
|
||||
uv_udp_recv_start(udpSocket, _allocBuffer, _onRead);
|
||||
|
||||
uv_thread_create(&recvTid, startRecvLoop, loop);
|
||||
uv_thread_create(&recvTid, startRecvLoop, recvLoop);
|
||||
uv_thread_create(&sendTid, startSendLoop, sendLoop);
|
||||
|
||||
CCLOG("Finished opening UDP session at port=%d", port);
|
||||
|
||||
@@ -335,17 +249,19 @@ bool DelayNoMore::UdpSession::openUdpSession(int port) {
|
||||
bool DelayNoMore::UdpSession::closeUdpSession() {
|
||||
CCLOG("About to close udp session and dealloc all resources...");
|
||||
|
||||
for (int i = 0; i < maxPeerCnt; i++) {
|
||||
peerAddrList[i].authKey = -1; // hardcoded for now
|
||||
memset((char*)&peerAddrList[i].sockAddrIn, 0, sizeof(peerAddrList[i].sockAddrIn));
|
||||
}
|
||||
uv_async_send(&uvLoopStopSig); // The few if not only guaranteed thread safe utility of libuv :) See http://docs.libuv.org/en/v1.x/async.html#c.uv_async_send
|
||||
CCLOG("Signaling UvThread to end in GameThread...");
|
||||
uv_async_send(&uvSendLoopStopSig);
|
||||
CCLOG("Signaling UvSendThread to end in GameThread...");
|
||||
uv_thread_join(&sendTid);
|
||||
free(udpSendSocket);
|
||||
free(sendLoop);
|
||||
delete sendRingBuff;
|
||||
|
||||
uv_async_send(&uvRecvLoopStopSig); // The few if not only guaranteed thread safe utility of libuv :) See http://docs.libuv.org/en/v1.x/async.html#c.uv_async_send
|
||||
CCLOG("Signaling UvRecvThread to end in GameThread...");
|
||||
uv_thread_join(&recvTid);
|
||||
|
||||
free(udpSocket);
|
||||
free(loop);
|
||||
free(udpRecvSocket);
|
||||
free(recvLoop);
|
||||
delete recvRingBuff;
|
||||
|
||||
CCLOG("Closed udp session and dealloc all resources in GameThread...");
|
||||
|
||||
@@ -353,46 +269,116 @@ bool DelayNoMore::UdpSession::closeUdpSession() {
|
||||
}
|
||||
|
||||
bool DelayNoMore::UdpSession::punchToServer(CHARC* const srvIp, int const srvPort, BYTEC* const bytes, size_t bytesLen, int const udpTunnelSrvPort, BYTEC* const udpTunnelBytes, size_t udpTunnelBytesBytesLen) {
|
||||
/*
|
||||
[WARNING] The RAM space used for "bytes", either on stack or in heap, is preallocatedand managed by the caller which runs on the GameThread. Actual sending will be made on UvThread.
|
||||
|
||||
Therefore we make a copy of this message before dispatching it "GameThread -> UvThread".
|
||||
*/
|
||||
memset(SRV_IP, 0, sizeof SRV_IP);
|
||||
memcpy(SRV_IP, srvIp, strlen(srvIp));
|
||||
SRV_PORT = srvPort;
|
||||
UDP_TUNNEL_SRV_PORT = udpTunnelSrvPort;
|
||||
PunchServerWork* work = new PunchServerWork(bytes, bytesLen, udpTunnelBytes, udpTunnelBytesBytesLen);
|
||||
uv_work_t* wrapper = (uv_work_t*)malloc(sizeof(uv_work_t));
|
||||
wrapper->data = work;
|
||||
uv_queue_work(loop, wrapper, _punchServerOnUvThread, _afterPunchServer);
|
||||
|
||||
struct sockaddr_in udpPunchingServerDestAddr;
|
||||
uv_ip4_addr(SRV_IP, SRV_PORT, &udpPunchingServerDestAddr);
|
||||
udpPunchingServerAddr.sockAddrIn = udpPunchingServerDestAddr;
|
||||
|
||||
struct sockaddr_in udpTunnelDestAddr;
|
||||
uv_ip4_addr(SRV_IP, UDP_TUNNEL_SRV_PORT, &udpTunnelDestAddr);
|
||||
udpTunnelAddr.sockAddrIn = udpTunnelDestAddr;
|
||||
|
||||
/*
|
||||
Libuv is really inconvenient here, neither "uv_queue_work" nor "uv_async_init" is threadsafe(http ://docs.libuv.org/en/v1.x/threadpool.html#c.uv_queue_work)! What's the point of such a queue? It's even more difficult than writing my own implementation -- again a threadsafe RingBuff could be used to the rescue, yet I'd like to investigate more into how to make the following threadsafe APIs with minimum cross-platform C++ codes
|
||||
- _sendMessage(...), should be both non-blocking & threadsafe, called from GameThread
|
||||
- _onRead(...), should be called first in UvRecvThread in an edge-triggered manner like idiomatic "epoll" or "kqueue", then dispatch the received message to GameThread by a threadsafe RingBuff
|
||||
*/
|
||||
|
||||
uv_mutex_lock(&sendRingBuffLock);
|
||||
sendRingBuff->put(bytes, bytesLen, &udpPunchingServerAddr);
|
||||
sendRingBuff->put(udpTunnelBytes, udpTunnelBytesBytesLen, &udpTunnelAddr);
|
||||
uv_mutex_unlock(&sendRingBuffLock);
|
||||
uv_async_send(&uvSendLoopTriggerSig);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DelayNoMore::UdpSession::upsertPeerUdpAddr(struct PeerAddr* newPeerAddrList, int roomCapacity, int selfJoinIndex) {
|
||||
// Call timer for multiple sendings from JavaScript?
|
||||
CCLOG("upsertPeerUdpAddr called by js for roomCapacity=%d, selfJoinIndex=%d.", roomCapacity, selfJoinIndex);
|
||||
|
||||
// Punching between existing peer-pairs for Address/Port-restricted Cone NAT (not need for Full Cone NAT); UvThread never writes into "peerAddrList", so I assume that it's safe to skip locking for them
|
||||
uv_mutex_lock(&sendRingBuffLock);
|
||||
for (int i = 0; i < roomCapacity; i++) {
|
||||
if (i == selfJoinIndex - 1) continue;
|
||||
peerAddrList[i].sockAddrIn = (*(newPeerAddrList + i)).sockAddrIn;
|
||||
peerAddrList[i].authKey = (*(newPeerAddrList + i)).authKey;
|
||||
struct PeerAddr* cand = (newPeerAddrList + i);
|
||||
if (NULL == cand || 0 == cand->sockAddrIn.sin_port) continue; // Not initialized
|
||||
peerAddrList[i].sockAddrIn = cand->sockAddrIn;
|
||||
peerAddrList[i].authKey = cand->authKey;
|
||||
sendRingBuff->put("foobar", 6, &(peerAddrList[i])); // Content hardcoded for now
|
||||
}
|
||||
|
||||
PunchPeerWork* work = new PunchPeerWork(roomCapacity, selfJoinIndex);
|
||||
uv_work_t* wrapper = (uv_work_t*)malloc(sizeof(uv_work_t));
|
||||
wrapper->data = work;
|
||||
uv_queue_work(loop, wrapper, _startPunchPeerTimerOnUvThread, _afterPunchPeerTimerStarted);
|
||||
uv_mutex_unlock(&sendRingBuffLock);
|
||||
uv_async_send(&uvSendLoopTriggerSig);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DelayNoMore::UdpSession::broadcastInputFrameUpsync(BYTEC* const bytes, size_t bytesLen, int roomCapacity, int selfJoinIndex) {
|
||||
BroadcastInputFrameUpsyncWork* work = new BroadcastInputFrameUpsyncWork(bytes, bytesLen, roomCapacity, selfJoinIndex);
|
||||
uv_work_t* wrapper = (uv_work_t*)malloc(sizeof(uv_work_t));
|
||||
wrapper->data = work;
|
||||
uv_queue_work(loop, wrapper, _broadcastInputFrameUpsyncOnUvThread, _afterBroadcastInputFrameUpsync);
|
||||
uv_mutex_lock(&sendRingBuffLock);
|
||||
// Might want to send several times for better arrival rate
|
||||
for (int j = 0; j < broadcastUpsyncCnt; j++) {
|
||||
int peerPunchedCnt = 0;
|
||||
for (int i = 0; i < roomCapacity; i++) {
|
||||
if (i + 1 == selfJoinIndex) {
|
||||
continue;
|
||||
}
|
||||
if (0 == peerAddrList[i].sockAddrIn.sin_port) {
|
||||
// Peer addr not initialized
|
||||
continue;
|
||||
}
|
||||
if (false == peerPunchedMarks[i]) {
|
||||
// Not punched yet, save some bandwidth
|
||||
continue;
|
||||
}
|
||||
sendRingBuff->put(bytes, bytesLen, &(peerAddrList[i]));
|
||||
++peerPunchedCnt;
|
||||
}
|
||||
|
||||
if (peerPunchedCnt + 1 < roomCapacity) {
|
||||
// Send to room udp tunnel in case of ANY hole punching failure
|
||||
sendRingBuff->put(bytes, bytesLen, &udpTunnelAddr);
|
||||
}
|
||||
}
|
||||
|
||||
uv_mutex_unlock(&sendRingBuffLock);
|
||||
uv_async_send(&uvSendLoopTriggerSig);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DelayNoMore::UdpSession::pollUdpRecvRingBuff() {
|
||||
// This function is called by GameThread 60 fps.
|
||||
|
||||
//uv_mutex_lock(&recvRingBuffLock);
|
||||
while (true) {
|
||||
RecvWork f;
|
||||
bool res = recvRingBuff->pop(&f);
|
||||
if (!res) return false;
|
||||
|
||||
// [WARNING] Declaring "AutoHandleScope" is critical here, otherwise "onUdpMessageCb.toObject()" wouldn't be recognized as a function of the ScriptEngine!
|
||||
se::AutoHandleScope hs;
|
||||
// [WARNING] Use of the "ScriptEngine" is only allowed in "GameThread a.k.a. CocosThread"!
|
||||
se::Value onUdpMessageCb;
|
||||
se::ScriptEngine::getInstance()->getGlobalObject()->getProperty("onUdpMessage", &onUdpMessageCb);
|
||||
if (onUdpMessageCb.isObject() && onUdpMessageCb.toObject()->isFunction()) {
|
||||
//CCLOG("UDP received %d bytes upsync -- 1", nread);
|
||||
se::Object* const gameThreadMsg = se::Object::createTypedArray(se::Object::TypedArrayType::UINT8, f.ui8Arr, f.bytesLen);
|
||||
//CCLOG("UDP received %d bytes upsync -- 2", nread);
|
||||
se::ValueArray args = { se::Value(gameThreadMsg) };
|
||||
|
||||
// Temporarily assume that the "this" ptr within callback is NULL.
|
||||
bool ok = onUdpMessageCb.toObject()->call(args, NULL);
|
||||
if (!ok) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
//CCLOG("UDP received %d bytes upsync -- 3", nread);
|
||||
gameThreadMsg->decRef(); // Reference http://docs.cocos.com/creator/2.2/manual/en/advanced-topics/JSB2.0-learning.html#seobject
|
||||
//CCLOG("UDP received %d bytes upsync -- 4", nread);
|
||||
}
|
||||
}
|
||||
//uv_mutex_unlock(&recvRingBuffLock);
|
||||
return true;
|
||||
}
|
@@ -1,18 +1,9 @@
|
||||
#include "uv/uv.h"
|
||||
#define __SSIZE_T // Otherwise "ssize_t" would have conflicting macros error that stops compiling
|
||||
|
||||
#ifndef udp_session_hpp
|
||||
#define udp_session_hpp
|
||||
|
||||
typedef char BYTEC;
|
||||
typedef char const CHARC;
|
||||
int const maxUdpPayloadBytes = 128;
|
||||
#include "send_ring_buff.hpp"
|
||||
|
||||
int const maxPeerCnt = 10;
|
||||
struct PeerAddr {
|
||||
struct sockaddr_in sockAddrIn;
|
||||
uint32_t authKey;
|
||||
};
|
||||
|
||||
namespace DelayNoMore {
|
||||
class UdpSession {
|
||||
@@ -23,6 +14,7 @@ namespace DelayNoMore {
|
||||
//static bool clearPeerUDPAddrList();
|
||||
static bool punchToServer(CHARC* const srvIp, int const srvPort, BYTEC* const bytes, size_t bytesLen, int const udpTunnelSrvPort, BYTEC* const udpTunnelBytes, size_t udpTunnelBytesBytesLen);
|
||||
static bool broadcastInputFrameUpsync(BYTEC* const bytes, size_t bytesLen, int roomCapacity, int selfJoinIndex);
|
||||
static bool pollUdpRecvRingBuff();
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
@@ -126,8 +126,21 @@ bool upsertPeerUdpAddr(se::State& s) {
|
||||
}
|
||||
SE_BIND_FUNC(upsertPeerUdpAddr)
|
||||
|
||||
static bool udpSessionFinalize(se::State& s)
|
||||
{
|
||||
bool pollUdpRecvRingBuff(se::State& s) {
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (0 == argc) {
|
||||
SE_PRECONDITION2(ok, false, "upsertPeerUdpAddr: Error processing arguments");
|
||||
return DelayNoMore::UdpSession::pollUdpRecvRingBuff();
|
||||
}
|
||||
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d; or wrong arg type!", (int)argc, 0);
|
||||
|
||||
return false;
|
||||
}
|
||||
SE_BIND_FUNC(pollUdpRecvRingBuff)
|
||||
|
||||
static bool udpSessionFinalize(se::State& s) {
|
||||
CCLOGINFO("jsbindings: finalizing JS object %p (DelayNoMore::UdpSession)", s.nativeThisObject());
|
||||
auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject());
|
||||
if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) {
|
||||
@@ -141,8 +154,7 @@ SE_BIND_FINALIZE_FUNC(udpSessionFinalize)
|
||||
|
||||
se::Object* __jsb_udp_session_proto = nullptr;
|
||||
se::Class* __jsb_udp_session_class = nullptr;
|
||||
bool registerUdpSession(se::Object* obj)
|
||||
{
|
||||
bool registerUdpSession(se::Object* obj) {
|
||||
// Get the ns
|
||||
se::Value nsVal;
|
||||
if (!obj->getProperty("DelayNoMore", &nsVal))
|
||||
@@ -160,6 +172,7 @@ bool registerUdpSession(se::Object* obj)
|
||||
cls->defineStaticFunction("broadcastInputFrameUpsync", _SE(broadcastInputFrameUpsync));
|
||||
cls->defineStaticFunction("closeUdpSession", _SE(closeUdpSession));
|
||||
cls->defineStaticFunction("upsertPeerUdpAddr", _SE(upsertPeerUdpAddr));
|
||||
cls->defineStaticFunction("pollUdpRecvRingBuff", _SE(pollUdpRecvRingBuff));
|
||||
cls->defineFinalizeFunction(_SE(udpSessionFinalize));
|
||||
cls->install();
|
||||
|
||||
|
@@ -15,5 +15,5 @@ SE_DECLARE_FUNC(punchToServer);
|
||||
SE_DECLARE_FUNC(broadcastInputFrameUpsync);
|
||||
SE_DECLARE_FUNC(closeUdpSession);
|
||||
SE_DECLARE_FUNC(upsertPeerUdpAddr);
|
||||
|
||||
SE_DECLARE_FUNC(pollUdpRecvRingBuff);
|
||||
#endif
|
||||
|
@@ -15,6 +15,7 @@ LOCAL_SRC_FILES := hellojavascript/main.cpp \
|
||||
../../../Classes/jsb_module_register.cpp \
|
||||
../../../Classes/udp_session.cpp \
|
||||
../../../Classes/udp_session_bridge.cpp \
|
||||
../../../Classes/send_ring_buff.cpp
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../Classes
|
||||
|
||||
|
@@ -190,9 +190,11 @@ copy "$(ProjectDir)..\..\..\project.json" "$(OutDir)\" /Y</Command>
|
||||
<ClCompile Include="..\Classes\AppDelegate.cpp" />
|
||||
<ClCompile Include="..\Classes\udp_session.cpp" />
|
||||
<ClCompile Include="..\Classes\udp_session_bridge.cpp" />
|
||||
<ClCompile Include="..\Classes\send_ring_buff.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="main.h" />
|
||||
<ClInclude Include="..\Classes\send_ring_buff.hpp" />
|
||||
<ClInclude Include="..\Classes\udp_session.hpp" />
|
||||
<ClInclude Include="..\Classes\udp_session_bridge.hpp" />
|
||||
<ClInclude Include="..\Classes\AppDelegate.h" />
|
||||
@@ -207,4 +209,4 @@ copy "$(ProjectDir)..\..\..\project.json" "$(OutDir)\" /Y</Command>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@@ -22,6 +22,9 @@
|
||||
<ClCompile Include="..\Classes\jsb_module_register.cpp">
|
||||
<Filter>Classes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Classes\send_ring_buff.cpp">
|
||||
<Filter>Classes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Classes\udp_session.cpp">
|
||||
<Filter>Classes</Filter>
|
||||
</ClCompile>
|
||||
@@ -37,6 +40,9 @@
|
||||
<Filter>win32</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="..\Classes\send_ring_buff.hpp">
|
||||
<Filter>Classes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Classes\udp_session.hpp">
|
||||
<Filter>Classes</Filter>
|
||||
</ClInclude>
|
||||
@@ -54,4 +60,4 @@
|
||||
<Filter>resource</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@@ -33,6 +33,8 @@
|
||||
"design-resolution-height": 640,
|
||||
"design-resolution-width": 960,
|
||||
"excluded-modules": [
|
||||
"Audio",
|
||||
"AudioSource",
|
||||
"Collider",
|
||||
"DragonBones",
|
||||
"Geom Utils",
|
||||
@@ -43,8 +45,11 @@
|
||||
"Physics",
|
||||
"PageView",
|
||||
"PageViewIndicator",
|
||||
"ParticleSystem",
|
||||
"RichText",
|
||||
"Slider",
|
||||
"ScrollBar",
|
||||
"ScrollView",
|
||||
"Spine Skeleton",
|
||||
"StudioComponent",
|
||||
"VideoPlayer",
|
||||
@@ -71,7 +76,7 @@
|
||||
"shelter_z_reducer",
|
||||
"shelter"
|
||||
],
|
||||
"last-module-event-record-time": 1674632533161,
|
||||
"last-module-event-record-time": 1675852779064,
|
||||
"simulator-orientation": false,
|
||||
"simulator-resolution": {
|
||||
"height": 640,
|
||||
|
@@ -22,15 +22,22 @@ const (
|
||||
GRAVITY_X = int32(0)
|
||||
GRAVITY_Y = -int32(float64(0.5) * WORLD_TO_VIRTUAL_GRID_RATIO) // makes all "playerCollider.Y" a multiple of 0.5 in all cases
|
||||
|
||||
INPUT_DELAY_FRAMES = int32(6) // in the count of render frames
|
||||
INPUT_DELAY_FRAMES = int32(6) // in the count of render frames
|
||||
|
||||
/*
|
||||
[WARNING]
|
||||
Experimentally having an input rate > 15 (e.g., 60 >> 2) doesn't improve multiplayer smoothness, in fact higher input rate often results in higher packet loss (both TCP and UDP) thus higher wrong prediction rate!
|
||||
*/
|
||||
INPUT_SCALE_FRAMES = uint32(2) // inputDelayedAndScaledFrameId = ((originalFrameId - InputDelayFrames) >> InputScaleFrames)
|
||||
NST_DELAY_FRAMES = int32(16) // 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"
|
||||
|
||||
SP_ATK_LOOKUP_FRAMES = int32(5)
|
||||
|
||||
SNAP_INTO_PLATFORM_OVERLAP = float64(0.1)
|
||||
SNAP_INTO_PLATFORM_THRESHOLD = float64(0.5)
|
||||
VERTICAL_PLATFORM_THRESHOLD = float64(0.9)
|
||||
MAGIC_FRAMES_TO_BE_ONWALL = int32(12)
|
||||
|
||||
DYING_FRAMES_TO_RECOVER = int32(60) // MUST BE SAME FOR EVERY CHARACTER FOR FAIRNESS!
|
||||
|
||||
NO_SKILL = -1
|
||||
NO_SKILL_HIT = -1
|
||||
@@ -79,6 +86,7 @@ const (
|
||||
ATK_CHARACTER_STATE_ONWALL = int32(16)
|
||||
|
||||
ATK_CHARACTER_STATE_TURNAROUND = int32(17)
|
||||
ATK_CHARACTER_STATE_DYING = int32(18)
|
||||
)
|
||||
|
||||
var inAirSet = map[int32]bool{
|
||||
@@ -95,13 +103,15 @@ var noOpSet = map[int32]bool{
|
||||
ATK_CHARACTER_STATE_INAIR_ATKED1: true,
|
||||
ATK_CHARACTER_STATE_BLOWN_UP1: true,
|
||||
ATK_CHARACTER_STATE_LAY_DOWN1: true,
|
||||
// During the invinsible frames of GET_UP1, the player is allowed to take any action
|
||||
// [WARNING] During the invinsible frames of GET_UP1, the player is allowed to take any action
|
||||
ATK_CHARACTER_STATE_DYING: true,
|
||||
}
|
||||
|
||||
var invinsibleSet = map[int32]bool{
|
||||
ATK_CHARACTER_STATE_BLOWN_UP1: true,
|
||||
ATK_CHARACTER_STATE_LAY_DOWN1: true,
|
||||
ATK_CHARACTER_STATE_GET_UP1: true,
|
||||
ATK_CHARACTER_STATE_DYING: true,
|
||||
}
|
||||
|
||||
var nonAttackingSet = map[int32]bool{
|
||||
@@ -114,6 +124,7 @@ var nonAttackingSet = map[int32]bool{
|
||||
ATK_CHARACTER_STATE_BLOWN_UP1: true,
|
||||
ATK_CHARACTER_STATE_LAY_DOWN1: true,
|
||||
ATK_CHARACTER_STATE_GET_UP1: true,
|
||||
ATK_CHARACTER_STATE_DYING: true,
|
||||
}
|
||||
|
||||
func intAbs(x int32) int32 {
|
||||
@@ -487,7 +498,7 @@ func deriveOpPattern(currPlayerDownsync, thatPlayerInNextFrame *PlayerDownsync,
|
||||
canJumpWithinInertia := currPlayerDownsync.CapturedByInertia && ((chConfig.InertiaFramesToRecover >> 1) > currPlayerDownsync.FramesToRecover)
|
||||
if 0 == currPlayerDownsync.FramesToRecover || canJumpWithinInertia {
|
||||
if decodedInput.BtnBLevel > prevBtnBLevel {
|
||||
if chConfig.DashingEnabled && 0 > decodedInput.Dy {
|
||||
if chConfig.DashingEnabled && 0 > decodedInput.Dy && ATK_CHARACTER_STATE_DASHING != currPlayerDownsync.CharacterState {
|
||||
// Checking "DashingEnabled" here to allow jumping when dashing-disabled players pressed "DOWN + BtnB"
|
||||
patternId = 5
|
||||
} else if _, existent := inAirSet[currPlayerDownsync.CharacterState]; !existent {
|
||||
@@ -517,7 +528,31 @@ func deriveOpPattern(currPlayerDownsync, thatPlayerInNextFrame *PlayerDownsync,
|
||||
return patternId, jumpedOrNot, effDx, effDy
|
||||
}
|
||||
|
||||
// [WARNING] The params of this method is carefully tuned such that only "battle.RoomDownsyncFrame" is a necessary custom struct.
|
||||
/*
|
||||
[LONG TERM PERFORMANCE ENHANCEMENT PLAN]
|
||||
|
||||
The function "ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame" is creating new heap-memory blocks at 60fps, e.g. nextRenderFramePlayers & nextRenderFrameMeleeBullets & nextRenderFrameFireballBullets & effPushbacks & hardPushbackNorms & jumpedOrNotList & playerColliders & bulletColliders, which would induce "possibly performance impacting garbage collections" when many rooms are running simultaneously.
|
||||
|
||||
It's not easy to remove all of the dynamic heap-memory blocks allocation/deallocation, but we can reduce them to some extent. For example, the creation of new "RoomDownsyncFrame" in heap-memory can be avoided by adding
|
||||
|
||||
```
|
||||
func overwriteRoomDownsyncFrame(src *RoomDownsyncFrame, dst *RoomDownsyncFrame) {
|
||||
// Copy "src" into "dst" down to every primitive field; as for a same room, the "RenderFrameBuffer" is always accessed (R & W) by a same kernel thread (both frontend & backend), no thread-safety concern here
|
||||
}
|
||||
|
||||
type Room struct {
|
||||
newRoomDownsyncFrameHolder *RoomDownsyncFrame
|
||||
}
|
||||
|
||||
func (pR *Room) provisionNewRoomDownsyncFrameHolder(src *RoomDownsyncFrame) {
|
||||
overwriteRoomDownsyncFrame(src, pR.newRoomDownsyncFrameHolder)
|
||||
}
|
||||
```
|
||||
|
||||
then pass in the whole "renderFrameBuffer *SpecificRingBuffer" to this function and overwrite the target slot IN-PLACE, i.e. need write new "SpecificRingBuffer.Put/SetByFrameId" to use the new function "overwriteRoomDownsyncFrame(src, dst)" to keep "%p of every SpecificRingBuffer.Eles[i]" constant.
|
||||
|
||||
However, the enhancement for "playerColliders & bulletColliders" of each room is even more difficult, because the feasibility of doing in-place overwrites depends on the collision library in use.
|
||||
*/
|
||||
func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer, currRenderFrame *RoomDownsyncFrame, collisionSys *resolv.Space, collisionSysMap map[int32]*resolv.Object, collisionSpaceOffsetX, collisionSpaceOffsetY float64, chConfigsOrderedByJoinIndex []*CharacterConfig) *RoomDownsyncFrame {
|
||||
// [WARNING] On backend this function MUST BE called while "InputsBufferLock" is locked!
|
||||
roomCapacity := len(currRenderFrame.PlayersArr)
|
||||
@@ -525,32 +560,36 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer
|
||||
// Make a copy first
|
||||
for i, currPlayerDownsync := range currRenderFrame.PlayersArr {
|
||||
nextRenderFramePlayers[i] = &PlayerDownsync{
|
||||
Id: currPlayerDownsync.Id,
|
||||
VirtualGridX: currPlayerDownsync.VirtualGridX,
|
||||
VirtualGridY: currPlayerDownsync.VirtualGridY,
|
||||
DirX: currPlayerDownsync.DirX,
|
||||
DirY: currPlayerDownsync.DirY,
|
||||
VelX: currPlayerDownsync.VelX,
|
||||
VelY: currPlayerDownsync.VelY,
|
||||
CharacterState: currPlayerDownsync.CharacterState,
|
||||
InAir: true,
|
||||
OnWall: false,
|
||||
Speed: currPlayerDownsync.Speed,
|
||||
BattleState: currPlayerDownsync.BattleState,
|
||||
Score: currPlayerDownsync.Score,
|
||||
Removed: currPlayerDownsync.Removed,
|
||||
JoinIndex: currPlayerDownsync.JoinIndex,
|
||||
Hp: currPlayerDownsync.Hp,
|
||||
MaxHp: currPlayerDownsync.MaxHp,
|
||||
FramesToRecover: currPlayerDownsync.FramesToRecover - 1,
|
||||
FramesInChState: currPlayerDownsync.FramesInChState + 1,
|
||||
ActiveSkillId: currPlayerDownsync.ActiveSkillId,
|
||||
ActiveSkillHit: currPlayerDownsync.ActiveSkillHit,
|
||||
FramesInvinsible: currPlayerDownsync.FramesInvinsible - 1,
|
||||
ColliderRadius: currPlayerDownsync.ColliderRadius,
|
||||
OnWallNormX: currPlayerDownsync.OnWallNormX,
|
||||
OnWallNormY: currPlayerDownsync.OnWallNormY,
|
||||
CapturedByInertia: currPlayerDownsync.CapturedByInertia,
|
||||
Id: currPlayerDownsync.Id,
|
||||
VirtualGridX: currPlayerDownsync.VirtualGridX,
|
||||
VirtualGridY: currPlayerDownsync.VirtualGridY,
|
||||
DirX: currPlayerDownsync.DirX,
|
||||
DirY: currPlayerDownsync.DirY,
|
||||
VelX: currPlayerDownsync.VelX,
|
||||
VelY: currPlayerDownsync.VelY,
|
||||
CharacterState: currPlayerDownsync.CharacterState,
|
||||
InAir: true,
|
||||
OnWall: false,
|
||||
Speed: currPlayerDownsync.Speed,
|
||||
BattleState: currPlayerDownsync.BattleState,
|
||||
Score: currPlayerDownsync.Score,
|
||||
Removed: currPlayerDownsync.Removed,
|
||||
JoinIndex: currPlayerDownsync.JoinIndex,
|
||||
Hp: currPlayerDownsync.Hp,
|
||||
MaxHp: currPlayerDownsync.MaxHp,
|
||||
FramesToRecover: currPlayerDownsync.FramesToRecover - 1,
|
||||
FramesInChState: currPlayerDownsync.FramesInChState + 1,
|
||||
ActiveSkillId: currPlayerDownsync.ActiveSkillId,
|
||||
ActiveSkillHit: currPlayerDownsync.ActiveSkillHit,
|
||||
FramesInvinsible: currPlayerDownsync.FramesInvinsible - 1,
|
||||
BulletTeamId: currPlayerDownsync.BulletTeamId,
|
||||
ChCollisionTeamId: currPlayerDownsync.ChCollisionTeamId,
|
||||
RevivalVirtualGridX: currPlayerDownsync.RevivalVirtualGridX,
|
||||
RevivalVirtualGridY: currPlayerDownsync.RevivalVirtualGridY,
|
||||
ColliderRadius: currPlayerDownsync.ColliderRadius,
|
||||
OnWallNormX: currPlayerDownsync.OnWallNormX,
|
||||
OnWallNormY: currPlayerDownsync.OnWallNormY,
|
||||
CapturedByInertia: currPlayerDownsync.CapturedByInertia,
|
||||
}
|
||||
if nextRenderFramePlayers[i].FramesToRecover < 0 {
|
||||
nextRenderFramePlayers[i].FramesToRecover = 0
|
||||
@@ -652,10 +691,12 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer
|
||||
*/
|
||||
alignedWithInertia := true
|
||||
exactTurningAround := false
|
||||
if 0 == effDx && 0 != thatPlayerInNextFrame.VelX {
|
||||
stoppingFromWalking := false
|
||||
if 0 != effDx && 0 == thatPlayerInNextFrame.VelX {
|
||||
alignedWithInertia = false
|
||||
} else if 0 != effDx && 0 == thatPlayerInNextFrame.VelX {
|
||||
} else if 0 == effDx && 0 != thatPlayerInNextFrame.VelX {
|
||||
alignedWithInertia = false
|
||||
stoppingFromWalking = true
|
||||
} else if 0 > effDx*thatPlayerInNextFrame.VelX {
|
||||
alignedWithInertia = false
|
||||
exactTurningAround = true
|
||||
@@ -672,6 +713,8 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer
|
||||
if exactTurningAround {
|
||||
thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_TURNAROUND
|
||||
thatPlayerInNextFrame.FramesToRecover = chConfig.InertiaFramesToRecover
|
||||
} else if stoppingFromWalking {
|
||||
thatPlayerInNextFrame.FramesToRecover = chConfig.InertiaFramesToRecover
|
||||
} else {
|
||||
thatPlayerInNextFrame.FramesToRecover = (chConfig.InertiaFramesToRecover >> 1)
|
||||
}
|
||||
@@ -711,6 +754,12 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer
|
||||
chConfig := chConfigsOrderedByJoinIndex[i]
|
||||
// Reset playerCollider position from the "virtual grid position"
|
||||
newVx, newVy := currPlayerDownsync.VirtualGridX+currPlayerDownsync.VelX, currPlayerDownsync.VirtualGridY+currPlayerDownsync.VelY
|
||||
if 0 >= thatPlayerInNextFrame.Hp && 0 == thatPlayerInNextFrame.FramesToRecover {
|
||||
// Revive from Dying
|
||||
newVx, newVy = currPlayerDownsync.RevivalVirtualGridX, currPlayerDownsync.RevivalVirtualGridY
|
||||
thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_IDLE1
|
||||
thatPlayerInNextFrame.Hp = currPlayerDownsync.MaxHp
|
||||
}
|
||||
if jumpedOrNotList[i] {
|
||||
// We haven't proceeded with "OnWall" calculation for "thatPlayerInNextFrame", thus use "currPlayerDownsync.OnWall" for checking
|
||||
if ATK_CHARACTER_STATE_ONWALL == currPlayerDownsync.CharacterState {
|
||||
@@ -764,38 +813,8 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer
|
||||
}
|
||||
|
||||
// 3. Add bullet colliders into collision system
|
||||
|
||||
// [WARNING] For rollback compatibility, static data of "BulletConfig" & "BattleAttr(static since instantiated)" can just be copies of the pointers in "RenderFrameBuffer", however, FireballBullets movement data as well as bullet animation data must be copies of instances for each RenderFrame!
|
||||
bulletColliders := make([]*resolv.Object, 0, len(currRenderFrame.MeleeBullets)) // Will all be removed at the end of this function due to the need for being rollback-compatible
|
||||
for _, prevMelee := range currRenderFrame.MeleeBullets {
|
||||
meleeBullet := &MeleeBullet{
|
||||
Bullet: prevMelee.Bullet,
|
||||
BattleAttr: prevMelee.BattleAttr,
|
||||
FramesInBlState: prevMelee.FramesInBlState + 1,
|
||||
BlState: prevMelee.BlState,
|
||||
}
|
||||
if IsMeleeBulletAlive(meleeBullet, currRenderFrame) {
|
||||
if IsMeleeBulletActive(meleeBullet, currRenderFrame) {
|
||||
offender := currRenderFrame.PlayersArr[meleeBullet.BattleAttr.OffenderJoinIndex-1]
|
||||
|
||||
xfac := int32(1) // By now, straight Punch offset doesn't respect "y-axis"
|
||||
if 0 > offender.DirX {
|
||||
xfac = -xfac
|
||||
}
|
||||
bulletWx, bulletWy := VirtualGridToWorldPos(offender.VirtualGridX+xfac*meleeBullet.Bullet.HitboxOffsetX, offender.VirtualGridY)
|
||||
hitboxSizeWx, hitboxSizeWy := VirtualGridToWorldPos(meleeBullet.Bullet.HitboxSizeX, meleeBullet.Bullet.HitboxSizeY)
|
||||
newBulletCollider := GenerateRectCollider(bulletWx, bulletWy, hitboxSizeWx, hitboxSizeWy, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, collisionSpaceOffsetX, collisionSpaceOffsetY, meleeBullet, "MeleeBullet")
|
||||
collisionSys.Add(newBulletCollider)
|
||||
bulletColliders = append(bulletColliders, newBulletCollider)
|
||||
meleeBullet.BlState = BULLET_ACTIVE
|
||||
if meleeBullet.BlState != prevMelee.BlState {
|
||||
meleeBullet.FramesInBlState = 0
|
||||
}
|
||||
}
|
||||
nextRenderFrameMeleeBullets = append(nextRenderFrameMeleeBullets, meleeBullet)
|
||||
}
|
||||
}
|
||||
|
||||
bulletColliders := make([]*resolv.Object, 0, ((len(currRenderFrame.MeleeBullets) + len(currRenderFrame.FireballBullets)) << 1)) // Will all be removed at the end of this function due to the need for being rollback-compatible
|
||||
for _, prevFireball := range currRenderFrame.FireballBullets {
|
||||
fireballBullet := &FireballBullet{
|
||||
VirtualGridX: prevFireball.VirtualGridX,
|
||||
@@ -824,12 +843,49 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer
|
||||
fireballBullet.VirtualGridX, fireballBullet.VirtualGridY = fireballBullet.VirtualGridX+fireballBullet.VelX, fireballBullet.VirtualGridY+fireballBullet.VelY
|
||||
//fmt.Printf("Pushing active fireball to next frame @currRenderFrame.Id=%d, bulletLocalId=%d, virtualGridX=%d, virtualGridY=%d, blState=%d\n", currRenderFrame.Id, fireballBullet.BattleAttr.BulletLocalId, fireballBullet.VirtualGridX, fireballBullet.VirtualGridY, fireballBullet.BlState)
|
||||
} else {
|
||||
offender := currRenderFrame.PlayersArr[fireballBullet.BattleAttr.OffenderJoinIndex-1]
|
||||
if _, existent := noOpSet[offender.CharacterState]; existent {
|
||||
// If a fireball is not yet active but the offender got attacked, remove it
|
||||
continue
|
||||
}
|
||||
//fmt.Printf("Pushing non-active fireball to next frame @currRenderFrame.Id=%d, bulletLocalId=%d, virtualGridX=%d, virtualGridY=%d, blState=%d\n", currRenderFrame.Id, fireballBullet.BattleAttr.BulletLocalId, fireballBullet.VirtualGridX, fireballBullet.VirtualGridY, fireballBullet.BlState)
|
||||
}
|
||||
nextRenderFrameFireballBullets = append(nextRenderFrameFireballBullets, fireballBullet)
|
||||
}
|
||||
}
|
||||
|
||||
for _, prevMelee := range currRenderFrame.MeleeBullets {
|
||||
meleeBullet := &MeleeBullet{
|
||||
Bullet: prevMelee.Bullet,
|
||||
BattleAttr: prevMelee.BattleAttr,
|
||||
FramesInBlState: prevMelee.FramesInBlState + 1,
|
||||
BlState: prevMelee.BlState,
|
||||
}
|
||||
if IsMeleeBulletAlive(meleeBullet, currRenderFrame) {
|
||||
offender := currRenderFrame.PlayersArr[meleeBullet.BattleAttr.OffenderJoinIndex-1]
|
||||
if _, existent := noOpSet[offender.CharacterState]; existent {
|
||||
// If a melee is alive but the offender got attacked, remove it even if it's active
|
||||
continue
|
||||
}
|
||||
if IsMeleeBulletActive(meleeBullet, currRenderFrame) {
|
||||
xfac := int32(1) // By now, straight Punch offset doesn't respect "y-axis"
|
||||
if 0 > offender.DirX {
|
||||
xfac = -xfac
|
||||
}
|
||||
bulletWx, bulletWy := VirtualGridToWorldPos(offender.VirtualGridX+xfac*meleeBullet.Bullet.HitboxOffsetX, offender.VirtualGridY)
|
||||
hitboxSizeWx, hitboxSizeWy := VirtualGridToWorldPos(meleeBullet.Bullet.HitboxSizeX, meleeBullet.Bullet.HitboxSizeY)
|
||||
newBulletCollider := GenerateRectCollider(bulletWx, bulletWy, hitboxSizeWx, hitboxSizeWy, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, collisionSpaceOffsetX, collisionSpaceOffsetY, meleeBullet, "MeleeBullet")
|
||||
collisionSys.Add(newBulletCollider)
|
||||
bulletColliders = append(bulletColliders, newBulletCollider)
|
||||
meleeBullet.BlState = BULLET_ACTIVE
|
||||
if meleeBullet.BlState != prevMelee.BlState {
|
||||
meleeBullet.FramesInBlState = 0
|
||||
}
|
||||
}
|
||||
nextRenderFrameMeleeBullets = append(nextRenderFrameMeleeBullets, meleeBullet)
|
||||
}
|
||||
}
|
||||
|
||||
// 4. Calc pushbacks for each player (after its movement) w/o bullets
|
||||
for i, currPlayerDownsync := range currRenderFrame.PlayersArr {
|
||||
joinIndex := currPlayerDownsync.JoinIndex
|
||||
@@ -889,7 +945,8 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer
|
||||
if fallStopping {
|
||||
thatPlayerInNextFrame.VelY = 0
|
||||
thatPlayerInNextFrame.VelX = 0
|
||||
if ATK_CHARACTER_STATE_BLOWN_UP1 == thatPlayerInNextFrame.CharacterState {
|
||||
if ATK_CHARACTER_STATE_DYING == thatPlayerInNextFrame.CharacterState {
|
||||
} else if ATK_CHARACTER_STATE_BLOWN_UP1 == thatPlayerInNextFrame.CharacterState {
|
||||
thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_LAY_DOWN1
|
||||
thatPlayerInNextFrame.FramesToRecover = chConfig.LayDownFramesToRecover
|
||||
} else {
|
||||
@@ -904,9 +961,11 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer
|
||||
thatPlayerInNextFrame.FramesToRecover = 0
|
||||
}
|
||||
} else {
|
||||
// landedOnGravityPushback not fallStopping, could be in LayDown or GetUp
|
||||
// landedOnGravityPushback not fallStopping, could be in LayDown or GetUp or Dying
|
||||
if _, existent := nonAttackingSet[thatPlayerInNextFrame.CharacterState]; existent {
|
||||
if ATK_CHARACTER_STATE_LAY_DOWN1 == thatPlayerInNextFrame.CharacterState {
|
||||
if ATK_CHARACTER_STATE_DYING == thatPlayerInNextFrame.CharacterState {
|
||||
// No update needed for Dying
|
||||
} else if ATK_CHARACTER_STATE_LAY_DOWN1 == thatPlayerInNextFrame.CharacterState {
|
||||
if 0 == thatPlayerInNextFrame.FramesToRecover {
|
||||
thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_GET_UP1
|
||||
thatPlayerInNextFrame.FramesToRecover = chConfig.GetUpFramesToRecover
|
||||
@@ -940,11 +999,6 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if !currPlayerDownsync.OnWall && thatPlayerInNextFrame.OnWall {
|
||||
// To avoid mysterious climbing up the wall after sticking on it
|
||||
thatPlayerInNextFrame.VelY = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
if !thatPlayerInNextFrame.OnWall {
|
||||
@@ -986,18 +1040,26 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer
|
||||
if 0 > offender.DirX {
|
||||
xfac = -xfac
|
||||
}
|
||||
pushbackVelX, pushbackVelY := xfac*v.Bullet.PushbackVelX, v.Bullet.PushbackVelY
|
||||
atkedPlayerInNextFrame := nextRenderFramePlayers[t.JoinIndex-1]
|
||||
atkedPlayerInNextFrame.VelX = pushbackVelX
|
||||
atkedPlayerInNextFrame.VelY = pushbackVelY
|
||||
if v.Bullet.BlowUp {
|
||||
atkedPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_BLOWN_UP1
|
||||
atkedPlayerInNextFrame.Hp -= v.Bullet.Damage
|
||||
if 0 >= atkedPlayerInNextFrame.Hp {
|
||||
// [WARNING] We don't have "dying in air" animation for now, and for better graphical recognition, play the same dying animation even in air
|
||||
atkedPlayerInNextFrame.Hp = 0
|
||||
atkedPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_DYING
|
||||
atkedPlayerInNextFrame.FramesToRecover = DYING_FRAMES_TO_RECOVER
|
||||
} else {
|
||||
atkedPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_ATKED1
|
||||
}
|
||||
oldFramesToRecover := nextRenderFramePlayers[t.JoinIndex-1].FramesToRecover
|
||||
if v.Bullet.HitStunFrames > oldFramesToRecover {
|
||||
atkedPlayerInNextFrame.FramesToRecover = v.Bullet.HitStunFrames
|
||||
pushbackVelX, pushbackVelY := xfac*v.Bullet.PushbackVelX, v.Bullet.PushbackVelY
|
||||
atkedPlayerInNextFrame.VelX = pushbackVelX
|
||||
atkedPlayerInNextFrame.VelY = pushbackVelY
|
||||
if v.Bullet.BlowUp {
|
||||
atkedPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_BLOWN_UP1
|
||||
} else {
|
||||
atkedPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_ATKED1
|
||||
}
|
||||
oldFramesToRecover := nextRenderFramePlayers[t.JoinIndex-1].FramesToRecover
|
||||
if v.Bullet.HitStunFrames > oldFramesToRecover {
|
||||
atkedPlayerInNextFrame.FramesToRecover = v.Bullet.HitStunFrames
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1026,18 +1088,26 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer
|
||||
if 0 > offender.DirX {
|
||||
xfac = -xfac
|
||||
}
|
||||
pushbackVelX, pushbackVelY := xfac*v.Bullet.PushbackVelX, v.Bullet.PushbackVelY
|
||||
atkedPlayerInNextFrame := nextRenderFramePlayers[t.JoinIndex-1]
|
||||
atkedPlayerInNextFrame.VelX = pushbackVelX
|
||||
atkedPlayerInNextFrame.VelY = pushbackVelY
|
||||
if v.Bullet.BlowUp {
|
||||
atkedPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_BLOWN_UP1
|
||||
atkedPlayerInNextFrame.Hp -= v.Bullet.Damage
|
||||
if 0 >= atkedPlayerInNextFrame.Hp {
|
||||
// [WARNING] We don't have "dying in air" animation for now, and for better graphical recognition, play the same dying animation even in air
|
||||
atkedPlayerInNextFrame.Hp = 0
|
||||
atkedPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_DYING
|
||||
atkedPlayerInNextFrame.FramesToRecover = DYING_FRAMES_TO_RECOVER
|
||||
} else {
|
||||
atkedPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_ATKED1
|
||||
}
|
||||
oldFramesToRecover := nextRenderFramePlayers[t.JoinIndex-1].FramesToRecover
|
||||
if v.Bullet.HitStunFrames > oldFramesToRecover {
|
||||
atkedPlayerInNextFrame.FramesToRecover = v.Bullet.HitStunFrames
|
||||
pushbackVelX, pushbackVelY := xfac*v.Bullet.PushbackVelX, v.Bullet.PushbackVelY
|
||||
atkedPlayerInNextFrame.VelX = pushbackVelX
|
||||
atkedPlayerInNextFrame.VelY = pushbackVelY
|
||||
if v.Bullet.BlowUp {
|
||||
atkedPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_BLOWN_UP1
|
||||
} else {
|
||||
atkedPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_ATKED1
|
||||
}
|
||||
oldFramesToRecover := nextRenderFramePlayers[t.JoinIndex-1].FramesToRecover
|
||||
if v.Bullet.HitStunFrames > oldFramesToRecover {
|
||||
atkedPlayerInNextFrame.FramesToRecover = v.Bullet.HitStunFrames
|
||||
}
|
||||
}
|
||||
default:
|
||||
exploded = true
|
||||
@@ -1072,9 +1142,7 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer
|
||||
oldNextCharacterState := thatPlayerInNextFrame.CharacterState
|
||||
switch oldNextCharacterState {
|
||||
case ATK_CHARACTER_STATE_IDLE1, ATK_CHARACTER_STATE_WALKING, ATK_CHARACTER_STATE_TURNAROUND:
|
||||
if thatPlayerInNextFrame.OnWall {
|
||||
thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_ONWALL
|
||||
} else if jumpedOrNotList[i] || ATK_CHARACTER_STATE_INAIR_IDLE1_BY_JUMP == currPlayerDownsync.CharacterState {
|
||||
if jumpedOrNotList[i] || ATK_CHARACTER_STATE_INAIR_IDLE1_BY_JUMP == currPlayerDownsync.CharacterState {
|
||||
thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_INAIR_IDLE1_BY_JUMP
|
||||
} else {
|
||||
thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_INAIR_IDLE1_NO_JUMP
|
||||
@@ -1087,6 +1155,17 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer
|
||||
}
|
||||
}
|
||||
|
||||
if thatPlayerInNextFrame.OnWall {
|
||||
switch thatPlayerInNextFrame.CharacterState {
|
||||
case ATK_CHARACTER_STATE_WALKING, ATK_CHARACTER_STATE_INAIR_IDLE1_BY_JUMP, ATK_CHARACTER_STATE_INAIR_IDLE1_NO_JUMP:
|
||||
hasBeenOnWallChState := (ATK_CHARACTER_STATE_ONWALL == currPlayerDownsync.CharacterState)
|
||||
hasBeenOnWallCollisionResultForSameChState := (currPlayerDownsync.OnWall && MAGIC_FRAMES_TO_BE_ONWALL <= thatPlayerInNextFrame.FramesInChState)
|
||||
if hasBeenOnWallChState || hasBeenOnWallCollisionResultForSameChState {
|
||||
thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_ONWALL
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Reset "FramesInChState" if "CharacterState" is changed
|
||||
if thatPlayerInNextFrame.CharacterState != currPlayerDownsync.CharacterState {
|
||||
thatPlayerInNextFrame.FramesInChState = 0
|
||||
|
@@ -51,8 +51,12 @@ var Characters = map[int]*CharacterConfig{
|
||||
|
||||
InertiaFramesToRecover: int32(9),
|
||||
|
||||
DashingEnabled: false,
|
||||
OnWallEnabled: false,
|
||||
DashingEnabled: true,
|
||||
OnWallEnabled: true,
|
||||
WallJumpingFramesToRecover: int32(8), // 8 would be the minimum for an avg human
|
||||
WallJumpingInitVelX: int32(float64(2.8) * WORLD_TO_VIRTUAL_GRID_RATIO), // Default is "appeared facing right", but actually holding ctrl against left
|
||||
WallJumpingInitVelY: int32(float64(7) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
WallSlidingVelY: int32(float64(-1) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
|
||||
SkillMapper: func(patternId int, currPlayerDownsync *PlayerDownsync) int {
|
||||
if 1 == patternId {
|
||||
@@ -75,6 +79,15 @@ var Characters = map[int]*CharacterConfig{
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if 3 == patternId {
|
||||
if 0 == currPlayerDownsync.FramesToRecover && !currPlayerDownsync.InAir {
|
||||
return 15
|
||||
}
|
||||
} else if 5 == patternId {
|
||||
// Dashing is already constrained by "FramesToRecover & CapturedByInertia" in "deriveOpPattern"
|
||||
if !currPlayerDownsync.InAir {
|
||||
return 12
|
||||
}
|
||||
}
|
||||
|
||||
// By default no skill can be fired
|
||||
@@ -128,9 +141,14 @@ var Characters = map[int]*CharacterConfig{
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if 3 == patternId {
|
||||
if 0 == currPlayerDownsync.FramesToRecover && !currPlayerDownsync.InAir {
|
||||
return 16
|
||||
}
|
||||
} else if 5 == patternId {
|
||||
// Air dash allowed for this character
|
||||
// Dashing is already constrained by "FramesToRecover & CapturedByInertia" in "deriveOpPattern"
|
||||
return 12
|
||||
return 13
|
||||
}
|
||||
|
||||
// By default no skill can be fired
|
||||
@@ -156,7 +174,7 @@ var Characters = map[int]*CharacterConfig{
|
||||
|
||||
InertiaFramesToRecover: int32(9),
|
||||
|
||||
DashingEnabled: false,
|
||||
DashingEnabled: true,
|
||||
OnWallEnabled: false,
|
||||
|
||||
SkillMapper: func(patternId int, currPlayerDownsync *PlayerDownsync) int {
|
||||
@@ -188,6 +206,11 @@ var Characters = map[int]*CharacterConfig{
|
||||
if 0 == currPlayerDownsync.FramesToRecover && !currPlayerDownsync.InAir {
|
||||
return 10
|
||||
}
|
||||
} else if 5 == patternId {
|
||||
// Dashing is already constrained by "FramesToRecover & CapturedByInertia" in "deriveOpPattern"
|
||||
if !currPlayerDownsync.InAir {
|
||||
return 14
|
||||
}
|
||||
}
|
||||
|
||||
// By default no skill can be fired
|
||||
@@ -492,30 +515,30 @@ var skills = map[int]*Skill{
|
||||
},
|
||||
},
|
||||
10: &Skill{
|
||||
RecoveryFrames: int32(40),
|
||||
RecoveryFramesOnBlock: int32(40),
|
||||
RecoveryFramesOnHit: int32(40),
|
||||
RecoveryFrames: int32(38),
|
||||
RecoveryFramesOnBlock: int32(38),
|
||||
RecoveryFramesOnHit: int32(38),
|
||||
ReleaseTriggerType: int32(1),
|
||||
BoundChState: ATK_CHARACTER_STATE_ATK4,
|
||||
Hits: []interface{}{
|
||||
&FireballBullet{
|
||||
Speed: int32(float64(5) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
Speed: int32(float64(6) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
Bullet: &BulletConfig{
|
||||
StartupFrames: int32(12),
|
||||
StartupFrames: int32(10),
|
||||
ActiveFrames: MAX_INT32,
|
||||
HitStunFrames: int32(15),
|
||||
BlockStunFrames: int32(9),
|
||||
Damage: int32(20),
|
||||
Damage: int32(22),
|
||||
SelfLockVelX: NO_LOCK_VEL,
|
||||
SelfLockVelY: NO_LOCK_VEL,
|
||||
PushbackVelX: int32(float64(2) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
PushbackVelY: int32(0),
|
||||
HitboxOffsetX: int32(float64(24) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxOffsetY: int32(float64(8) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxSizeX: int32(float64(48) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxSizeY: int32(float64(32) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxOffsetX: int32(float64(32) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxOffsetY: int32(float64(10) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxSizeX: int32(float64(64) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxSizeY: int32(float64(48) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
BlowUp: false,
|
||||
ExplosionFrames: 15,
|
||||
ExplosionFrames: 10,
|
||||
SpeciesId: int32(1),
|
||||
},
|
||||
},
|
||||
@@ -534,7 +557,7 @@ var skills = map[int]*Skill{
|
||||
ActiveFrames: int32(25),
|
||||
HitStunFrames: MAX_INT32,
|
||||
BlockStunFrames: int32(9),
|
||||
Damage: int32(30),
|
||||
Damage: int32(35),
|
||||
SelfLockVelX: int32(float64(1) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
SelfLockVelY: int32(float64(8) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
PushbackVelX: int32(float64(2) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
@@ -551,20 +574,20 @@ var skills = map[int]*Skill{
|
||||
},
|
||||
},
|
||||
12: &Skill{
|
||||
RecoveryFrames: int32(12),
|
||||
RecoveryFramesOnBlock: int32(12),
|
||||
RecoveryFramesOnHit: int32(12),
|
||||
RecoveryFrames: int32(10),
|
||||
RecoveryFramesOnBlock: int32(10),
|
||||
RecoveryFramesOnHit: int32(10),
|
||||
ReleaseTriggerType: int32(1),
|
||||
BoundChState: ATK_CHARACTER_STATE_DASHING,
|
||||
Hits: []interface{}{
|
||||
&MeleeBullet{
|
||||
Bullet: &BulletConfig{
|
||||
StartupFrames: int32(0),
|
||||
StartupFrames: int32(3),
|
||||
ActiveFrames: int32(0),
|
||||
HitStunFrames: MAX_INT32,
|
||||
HitStunFrames: int32(0),
|
||||
BlockStunFrames: int32(0),
|
||||
Damage: int32(0),
|
||||
SelfLockVelX: int32(float64(9) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
SelfLockVelX: int32(float64(6) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
SelfLockVelY: int32(0),
|
||||
PushbackVelX: NO_LOCK_VEL,
|
||||
PushbackVelY: NO_LOCK_VEL,
|
||||
@@ -577,6 +600,120 @@ var skills = map[int]*Skill{
|
||||
},
|
||||
},
|
||||
},
|
||||
13: &Skill{
|
||||
RecoveryFrames: int32(12),
|
||||
RecoveryFramesOnBlock: int32(12),
|
||||
RecoveryFramesOnHit: int32(12),
|
||||
ReleaseTriggerType: int32(1),
|
||||
BoundChState: ATK_CHARACTER_STATE_DASHING,
|
||||
Hits: []interface{}{
|
||||
&MeleeBullet{
|
||||
Bullet: &BulletConfig{
|
||||
StartupFrames: int32(3),
|
||||
ActiveFrames: int32(0),
|
||||
HitStunFrames: int32(0),
|
||||
BlockStunFrames: int32(0),
|
||||
Damage: int32(0),
|
||||
SelfLockVelX: int32(float64(8) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
SelfLockVelY: int32(0),
|
||||
PushbackVelX: NO_LOCK_VEL,
|
||||
PushbackVelY: NO_LOCK_VEL,
|
||||
HitboxOffsetX: int32(0),
|
||||
HitboxOffsetY: int32(0),
|
||||
HitboxSizeX: int32(0),
|
||||
HitboxSizeY: int32(0),
|
||||
BlowUp: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
14: &Skill{
|
||||
RecoveryFrames: int32(8),
|
||||
RecoveryFramesOnBlock: int32(8),
|
||||
RecoveryFramesOnHit: int32(8),
|
||||
ReleaseTriggerType: int32(1),
|
||||
BoundChState: ATK_CHARACTER_STATE_DASHING,
|
||||
Hits: []interface{}{
|
||||
&MeleeBullet{
|
||||
Bullet: &BulletConfig{
|
||||
StartupFrames: int32(4),
|
||||
ActiveFrames: int32(0),
|
||||
HitStunFrames: MAX_INT32,
|
||||
BlockStunFrames: int32(0),
|
||||
Damage: int32(0),
|
||||
SelfLockVelX: int32(float64(5) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
SelfLockVelY: int32(0),
|
||||
PushbackVelX: NO_LOCK_VEL,
|
||||
PushbackVelY: NO_LOCK_VEL,
|
||||
HitboxOffsetX: int32(0),
|
||||
HitboxOffsetY: int32(0),
|
||||
HitboxSizeX: int32(0),
|
||||
HitboxSizeY: int32(0),
|
||||
BlowUp: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
15: &Skill{
|
||||
RecoveryFrames: int32(48),
|
||||
RecoveryFramesOnBlock: int32(48),
|
||||
RecoveryFramesOnHit: int32(48),
|
||||
ReleaseTriggerType: int32(1),
|
||||
BoundChState: ATK_CHARACTER_STATE_ATK4,
|
||||
Hits: []interface{}{
|
||||
&FireballBullet{
|
||||
Speed: int32(float64(4) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
Bullet: &BulletConfig{
|
||||
StartupFrames: int32(12),
|
||||
ActiveFrames: MAX_INT32,
|
||||
HitStunFrames: int32(15),
|
||||
BlockStunFrames: int32(9),
|
||||
Damage: int32(18),
|
||||
SelfLockVelX: NO_LOCK_VEL,
|
||||
SelfLockVelY: NO_LOCK_VEL,
|
||||
PushbackVelX: int32(float64(3) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
PushbackVelY: int32(0),
|
||||
HitboxOffsetX: int32(float64(24) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxOffsetY: int32(float64(8) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxSizeX: int32(float64(48) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxSizeY: int32(float64(32) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
BlowUp: false,
|
||||
ExplosionFrames: 30,
|
||||
SpeciesId: int32(2),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
16: &Skill{
|
||||
RecoveryFrames: int32(60),
|
||||
RecoveryFramesOnBlock: int32(60),
|
||||
RecoveryFramesOnHit: int32(60),
|
||||
ReleaseTriggerType: int32(1),
|
||||
BoundChState: ATK_CHARACTER_STATE_ATK4,
|
||||
Hits: []interface{}{
|
||||
&FireballBullet{
|
||||
Speed: int32(float64(4) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
Bullet: &BulletConfig{
|
||||
StartupFrames: int32(16),
|
||||
ActiveFrames: MAX_INT32,
|
||||
HitStunFrames: MAX_INT32,
|
||||
BlockStunFrames: int32(9),
|
||||
Damage: int32(30),
|
||||
SelfLockVelX: NO_LOCK_VEL,
|
||||
SelfLockVelY: NO_LOCK_VEL,
|
||||
PushbackVelX: int32(float64(3) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
PushbackVelY: int32(float64(7) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxOffsetX: int32(float64(24) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxOffsetY: int32(float64(8) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxSizeX: int32(float64(48) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
HitboxSizeY: int32(float64(32) * WORLD_TO_VIRTUAL_GRID_RATIO),
|
||||
BlowUp: true,
|
||||
ExplosionFrames: 30,
|
||||
SpeciesId: int32(3),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
255: &Skill{
|
||||
RecoveryFrames: int32(30),
|
||||
RecoveryFramesOnBlock: int32(30),
|
||||
|
@@ -46,6 +46,9 @@ type PlayerDownsync struct {
|
||||
|
||||
BulletTeamId int32
|
||||
ChCollisionTeamId int32 // not the same as "BulletTeamId", because even in the same team, we should allow inter-character collisions
|
||||
|
||||
RevivalVirtualGridX int32
|
||||
RevivalVirtualGridY int32
|
||||
}
|
||||
|
||||
type InputFrameDecoded struct {
|
||||
|
@@ -42,34 +42,36 @@ func NewBarrierJs(boundary *Polygon2D) *js.Object {
|
||||
})
|
||||
}
|
||||
|
||||
func NewPlayerDownsyncJs(id, virtualGridX, virtualGridY, dirX, dirY, velX, velY, framesToRecover, framesInChState, activeSkillId, activeSkillHit, framesInvinsible, speed, battleState, characterState, joinIndex, hp, maxHp, colliderRadius int32, inAir, onWall bool, onWallNormX, onWallNormY int32, capturedByInertia bool, bulletTeamId, chCollisionTeamId int32) *js.Object {
|
||||
func NewPlayerDownsyncJs(id, virtualGridX, virtualGridY, dirX, dirY, velX, velY, framesToRecover, framesInChState, activeSkillId, activeSkillHit, framesInvinsible, speed, battleState, characterState, joinIndex, hp, maxHp, colliderRadius int32, inAir, onWall bool, onWallNormX, onWallNormY int32, capturedByInertia bool, bulletTeamId, chCollisionTeamId int32, revivalVirtualGridX, revivalVirtualGridY int32) *js.Object {
|
||||
return js.MakeWrapper(&PlayerDownsync{
|
||||
Id: id,
|
||||
VirtualGridX: virtualGridX,
|
||||
VirtualGridY: virtualGridY,
|
||||
DirX: dirX,
|
||||
DirY: dirY,
|
||||
VelX: velX,
|
||||
VelY: velY,
|
||||
FramesToRecover: framesToRecover,
|
||||
FramesInChState: framesInChState,
|
||||
ActiveSkillId: activeSkillId,
|
||||
ActiveSkillHit: activeSkillHit,
|
||||
FramesInvinsible: framesInvinsible,
|
||||
Speed: speed,
|
||||
BattleState: battleState,
|
||||
CharacterState: characterState,
|
||||
JoinIndex: joinIndex,
|
||||
Hp: hp,
|
||||
MaxHp: maxHp,
|
||||
ColliderRadius: colliderRadius,
|
||||
InAir: inAir,
|
||||
OnWall: onWall,
|
||||
OnWallNormX: onWallNormX,
|
||||
OnWallNormY: onWallNormY,
|
||||
CapturedByInertia: capturedByInertia,
|
||||
BulletTeamId: bulletTeamId,
|
||||
ChCollisionTeamId: chCollisionTeamId,
|
||||
Id: id,
|
||||
VirtualGridX: virtualGridX,
|
||||
VirtualGridY: virtualGridY,
|
||||
DirX: dirX,
|
||||
DirY: dirY,
|
||||
VelX: velX,
|
||||
VelY: velY,
|
||||
FramesToRecover: framesToRecover,
|
||||
FramesInChState: framesInChState,
|
||||
ActiveSkillId: activeSkillId,
|
||||
ActiveSkillHit: activeSkillHit,
|
||||
FramesInvinsible: framesInvinsible,
|
||||
Speed: speed,
|
||||
BattleState: battleState,
|
||||
CharacterState: characterState,
|
||||
JoinIndex: joinIndex,
|
||||
Hp: hp,
|
||||
MaxHp: maxHp,
|
||||
ColliderRadius: colliderRadius,
|
||||
InAir: inAir,
|
||||
OnWall: onWall,
|
||||
OnWallNormX: onWallNormX,
|
||||
OnWallNormY: onWallNormY,
|
||||
CapturedByInertia: capturedByInertia,
|
||||
BulletTeamId: bulletTeamId,
|
||||
ChCollisionTeamId: chCollisionTeamId,
|
||||
RevivalVirtualGridX: revivalVirtualGridX,
|
||||
RevivalVirtualGridY: revivalVirtualGridY,
|
||||
})
|
||||
}
|
||||
|
||||
|