mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-26 19:58:56 +00:00
Initial recovery of MeleeBullet in online battle.
This commit is contained in:
parent
11d001465d
commit
69f0ddc171
@ -16,6 +16,7 @@ func toPbRoomDownsyncFrame(rdf *battle.RoomDownsyncFrame) *pb.RoomDownsyncFrame
|
|||||||
CountdownNanos: rdf.CountdownNanos,
|
CountdownNanos: rdf.CountdownNanos,
|
||||||
BackendUnconfirmedMask: rdf.BackendUnconfirmedMask,
|
BackendUnconfirmedMask: rdf.BackendUnconfirmedMask,
|
||||||
ShouldForceResync: rdf.ShouldForceResync,
|
ShouldForceResync: rdf.ShouldForceResync,
|
||||||
|
PlayerOpPatternToSkillId: make(map[int32]int32),
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, last := range rdf.PlayersArr {
|
for i, last := range rdf.PlayersArr {
|
||||||
@ -65,6 +66,10 @@ func toPbRoomDownsyncFrame(rdf *battle.RoomDownsyncFrame) *pb.RoomDownsyncFrame
|
|||||||
ret.MeleeBullets[i] = pbBullet
|
ret.MeleeBullets[i] = pbBullet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for i, last := range rdf.PlayerOpPatternToSkillId {
|
||||||
|
ret.PlayerOpPatternToSkillId[int32(i)] = int32(last)
|
||||||
|
}
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,6 +92,7 @@ type Room struct {
|
|||||||
Capacity int
|
Capacity int
|
||||||
collisionSpaceOffsetX float64
|
collisionSpaceOffsetX float64
|
||||||
collisionSpaceOffsetY float64
|
collisionSpaceOffsetY float64
|
||||||
|
playerOpPatternToSkillId map[int]int
|
||||||
Players map[int32]*Player
|
Players map[int32]*Player
|
||||||
PlayersArr []*Player // ordered by joinIndex
|
PlayersArr []*Player // ordered by joinIndex
|
||||||
Space *resolv.Space
|
Space *resolv.Space
|
||||||
@ -125,9 +126,9 @@ type Room struct {
|
|||||||
CurDynamicsRenderFrameId int32 // [WARNING] The dynamics of backend is ALWAYS MOVING FORWARD BY ALL-CONFIRMED INPUTFRAMES (either by upsync or forced), i.e. no rollback; Moreover when "true == BackendDynamicsEnabled" we always have "Room.CurDynamicsRenderFrameId >= Room.RenderFrameId" because each "all-confirmed inputFrame" is applied on "all applicable renderFrames" in one-go hence often sees a future "renderFrame" earlier
|
CurDynamicsRenderFrameId int32 // [WARNING] The dynamics of backend is ALWAYS MOVING FORWARD BY ALL-CONFIRMED INPUTFRAMES (either by upsync or forced), i.e. no rollback; Moreover when "true == BackendDynamicsEnabled" we always have "Room.CurDynamicsRenderFrameId >= Room.RenderFrameId" because each "all-confirmed inputFrame" is applied on "all applicable renderFrames" in one-go hence often sees a future "renderFrame" earlier
|
||||||
EffectivePlayerCount int32
|
EffectivePlayerCount int32
|
||||||
DismissalWaitGroup sync.WaitGroup
|
DismissalWaitGroup sync.WaitGroup
|
||||||
InputsBuffer *RingBuffer // Indices are STRICTLY consecutive
|
InputsBuffer *battle.RingBuffer // Indices are STRICTLY consecutive
|
||||||
InputsBufferLock sync.Mutex // Guards [InputsBuffer, LatestPlayerUpsyncedInputFrameId, LastAllConfirmedInputFrameId, LastAllConfirmedInputList, LastAllConfirmedInputFrameIdWithChange]
|
InputsBufferLock sync.Mutex // Guards [InputsBuffer, LatestPlayerUpsyncedInputFrameId, LastAllConfirmedInputFrameId, LastAllConfirmedInputList, LastAllConfirmedInputFrameIdWithChange]
|
||||||
RenderFrameBuffer *RingBuffer // Indices are STRICTLY consecutive
|
RenderFrameBuffer *battle.RingBuffer // Indices are STRICTLY consecutive
|
||||||
LatestPlayerUpsyncedInputFrameId int32
|
LatestPlayerUpsyncedInputFrameId int32
|
||||||
LastAllConfirmedInputFrameId int32
|
LastAllConfirmedInputFrameId int32
|
||||||
LastAllConfirmedInputFrameIdWithChange int32
|
LastAllConfirmedInputFrameIdWithChange int32
|
||||||
@ -396,11 +397,18 @@ func (pR *Room) StartBattle() {
|
|||||||
|
|
||||||
pR.RenderFrameId = 0
|
pR.RenderFrameId = 0
|
||||||
|
|
||||||
|
// [WARNING] Only since battle starts do we have all players bound to certain joinIndexes.
|
||||||
|
for _, player := range pR.Players {
|
||||||
|
opJoinIndexPrefix := (int(player.JoinIndex) << uint(8))
|
||||||
|
pR.playerOpPatternToSkillId[opJoinIndexPrefix+0] = 1 // Hardcoded for now
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize the "collisionSys" as well as "RenderFrameBuffer"
|
// Initialize the "collisionSys" as well as "RenderFrameBuffer"
|
||||||
pR.CurDynamicsRenderFrameId = 0
|
pR.CurDynamicsRenderFrameId = 0
|
||||||
kickoffFrameJs := &battle.RoomDownsyncFrame{
|
kickoffFrameJs := &battle.RoomDownsyncFrame{
|
||||||
Id: pR.RenderFrameId,
|
Id: pR.RenderFrameId,
|
||||||
PlayersArr: toJsPlayers(pR.Players),
|
PlayersArr: toJsPlayers(pR.Players),
|
||||||
|
PlayerOpPatternToSkillId: pR.playerOpPatternToSkillId,
|
||||||
CountdownNanos: pR.BattleDurationNanos,
|
CountdownNanos: pR.BattleDurationNanos,
|
||||||
}
|
}
|
||||||
pR.RenderFrameBuffer.Put(kickoffFrameJs)
|
pR.RenderFrameBuffer.Put(kickoffFrameJs)
|
||||||
@ -597,7 +605,7 @@ func (pR *Room) OnBattleCmdReceived(pReq *pb.WsReq) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pR *Room) onInputFrameDownsyncAllConfirmed(inputFrameDownsync *pb.InputFrameDownsync, playerId int32) {
|
func (pR *Room) onInputFrameDownsyncAllConfirmed(inputFrameDownsync *battle.InputFrameDownsync, playerId int32) {
|
||||||
// [WARNING] This function MUST BE called while "pR.InputsBufferLock" is locked!
|
// [WARNING] This function MUST BE called while "pR.InputsBufferLock" is locked!
|
||||||
inputFrameId := inputFrameDownsync.InputFrameId
|
inputFrameId := inputFrameDownsync.InputFrameId
|
||||||
if -1 == pR.LastAllConfirmedInputFrameIdWithChange || false == pR.equalInputLists(inputFrameDownsync.InputList, pR.LastAllConfirmedInputList) {
|
if -1 == pR.LastAllConfirmedInputFrameIdWithChange || false == pR.equalInputLists(inputFrameDownsync.InputList, pR.LastAllConfirmedInputList) {
|
||||||
@ -741,6 +749,7 @@ func (pR *Room) OnDismissed() {
|
|||||||
pR.SpAtkLookupFrames = 5
|
pR.SpAtkLookupFrames = 5
|
||||||
pR.PlayerDefaultSpeed = int32(float64(1) * pR.WorldToVirtualGridRatio) // in virtual grids per frame
|
pR.PlayerDefaultSpeed = int32(float64(1) * pR.WorldToVirtualGridRatio) // in virtual grids per frame
|
||||||
pR.CollisionMinStep = (int32(float64(pR.PlayerDefaultSpeed)*pR.VirtualGridToWorldRatio) << 3) // the approx minimum distance a player can move per frame in world coordinate
|
pR.CollisionMinStep = (int32(float64(pR.PlayerDefaultSpeed)*pR.VirtualGridToWorldRatio) << 3) // the approx minimum distance a player can move per frame in world coordinate
|
||||||
|
pR.playerOpPatternToSkillId = make(map[int]int)
|
||||||
pR.Players = make(map[int32]*Player)
|
pR.Players = make(map[int32]*Player)
|
||||||
pR.PlayersArr = make([]*Player, pR.Capacity)
|
pR.PlayersArr = make([]*Player, pR.Capacity)
|
||||||
pR.CollisionSysMap = make(map[int32]*resolv.Object)
|
pR.CollisionSysMap = make(map[int32]*resolv.Object)
|
||||||
@ -756,8 +765,8 @@ func (pR *Room) OnDismissed() {
|
|||||||
pR.PlayerSignalToCloseDict = make(map[int32]SignalToCloseConnCbType)
|
pR.PlayerSignalToCloseDict = make(map[int32]SignalToCloseConnCbType)
|
||||||
pR.JoinIndexBooleanArr = make([]bool, pR.Capacity)
|
pR.JoinIndexBooleanArr = make([]bool, pR.Capacity)
|
||||||
pR.RenderCacheSize = 1024
|
pR.RenderCacheSize = 1024
|
||||||
pR.RenderFrameBuffer = NewRingBuffer(pR.RenderCacheSize)
|
pR.RenderFrameBuffer = battle.NewRingBuffer(pR.RenderCacheSize)
|
||||||
pR.InputsBuffer = NewRingBuffer((pR.RenderCacheSize >> 1) + 1)
|
pR.InputsBuffer = battle.NewRingBuffer((pR.RenderCacheSize >> 1) + 1)
|
||||||
pR.rdfIdToActuallyUsedInput = make(map[int32]*pb.InputFrameDownsync)
|
pR.rdfIdToActuallyUsedInput = make(map[int32]*pb.InputFrameDownsync)
|
||||||
|
|
||||||
pR.LatestPlayerUpsyncedInputFrameId = -1
|
pR.LatestPlayerUpsyncedInputFrameId = -1
|
||||||
@ -782,30 +791,6 @@ func (pR *Room) OnDismissed() {
|
|||||||
|
|
||||||
pR.BackendDynamicsEnabled = true // [WARNING] When "false", recovery upon reconnection wouldn't work!
|
pR.BackendDynamicsEnabled = true // [WARNING] When "false", recovery upon reconnection wouldn't work!
|
||||||
pR.ForceAllResyncOnAnyActiveSlowTicker = true // See tradeoff discussion in "downsyncToAllPlayers"
|
pR.ForceAllResyncOnAnyActiveSlowTicker = true // See tradeoff discussion in "downsyncToAllPlayers"
|
||||||
punchSkillId := int32(1)
|
|
||||||
pR.MeleeSkillConfig = make(map[int32]*pb.MeleeBullet, 0)
|
|
||||||
pR.MeleeSkillConfig[punchSkillId] = &pb.MeleeBullet{
|
|
||||||
// for offender
|
|
||||||
StartupFrames: int32(10),
|
|
||||||
ActiveFrames: int32(10),
|
|
||||||
RecoveryFrames: int32(34),
|
|
||||||
RecoveryFramesOnBlock: int32(34),
|
|
||||||
RecoveryFramesOnHit: int32(34),
|
|
||||||
HitboxOffset: float64(12.0), // should be about the radius of the PlayerCollider
|
|
||||||
|
|
||||||
// for defender
|
|
||||||
HitStunFrames: int32(18),
|
|
||||||
BlockStunFrames: int32(9),
|
|
||||||
Pushback: float64(8.0),
|
|
||||||
ReleaseTriggerType: int32(1), // 1: rising-edge, 2: falling-edge
|
|
||||||
Damage: int32(5),
|
|
||||||
|
|
||||||
SelfMoveforwardX: 0,
|
|
||||||
SelfMoveforwardY: 0,
|
|
||||||
HitboxSizeX: 24.0,
|
|
||||||
HitboxSizeY: 32.0,
|
|
||||||
}
|
|
||||||
|
|
||||||
pR.SnapIntoPlatformOverlap = float64(0.1)
|
pR.SnapIntoPlatformOverlap = float64(0.1)
|
||||||
pR.SnapIntoPlatformThreshold = float64(0.5)
|
pR.SnapIntoPlatformThreshold = float64(0.5)
|
||||||
pR.JumpingInitVelY = int32(float64(7) * pR.WorldToVirtualGridRatio)
|
pR.JumpingInitVelY = int32(float64(7) * pR.WorldToVirtualGridRatio)
|
||||||
@ -1067,7 +1052,7 @@ func (pR *Room) shouldPrefabInputFrameDownsync(prevRenderFrameId int32, renderFr
|
|||||||
return false, -1
|
return false, -1
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pR *Room) getOrPrefabInputFrameDownsync(inputFrameId int32) *pb.InputFrameDownsync {
|
func (pR *Room) getOrPrefabInputFrameDownsync(inputFrameId int32) *battle.InputFrameDownsync {
|
||||||
/*
|
/*
|
||||||
[WARNING] This function MUST BE called while "pR.InputsBufferLock" is locked.
|
[WARNING] This function MUST BE called while "pR.InputsBufferLock" is locked.
|
||||||
|
|
||||||
@ -1076,12 +1061,12 @@ func (pR *Room) getOrPrefabInputFrameDownsync(inputFrameId int32) *pb.InputFrame
|
|||||||
- OR there's no change w.r.t. to its prev cmd.
|
- OR there's no change w.r.t. to its prev cmd.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var currInputFrameDownsync *pb.InputFrameDownsync = nil
|
var currInputFrameDownsync *battle.InputFrameDownsync = nil
|
||||||
tmp1 := pR.InputsBuffer.GetByFrameId(inputFrameId) // Would be nil if "pR.InputsBuffer.EdFrameId <= inputFrameId", else if "pR.InputsBuffer.EdFrameId > inputFrameId" is already met, then by now we can just return "tmp1.(*InputFrameDownsync)"
|
tmp1 := pR.InputsBuffer.GetByFrameId(inputFrameId) // Would be nil if "pR.InputsBuffer.EdFrameId <= inputFrameId", else if "pR.InputsBuffer.EdFrameId > inputFrameId" is already met, then by now we can just return "tmp1.(*InputFrameDownsync)"
|
||||||
if nil == tmp1 {
|
if nil == tmp1 {
|
||||||
for pR.InputsBuffer.EdFrameId <= inputFrameId {
|
for pR.InputsBuffer.EdFrameId <= inputFrameId {
|
||||||
j := pR.InputsBuffer.EdFrameId
|
j := pR.InputsBuffer.EdFrameId
|
||||||
currInputFrameDownsync = &pb.InputFrameDownsync{
|
currInputFrameDownsync = &battle.InputFrameDownsync{
|
||||||
InputFrameId: j,
|
InputFrameId: j,
|
||||||
InputList: make([]uint64, pR.Capacity),
|
InputList: make([]uint64, pR.Capacity),
|
||||||
ConfirmedList: uint64(0),
|
ConfirmedList: uint64(0),
|
||||||
@ -1093,7 +1078,7 @@ func (pR *Room) getOrPrefabInputFrameDownsync(inputFrameId int32) *pb.InputFrame
|
|||||||
}
|
}
|
||||||
tmp2 := pR.InputsBuffer.GetByFrameId(j2)
|
tmp2 := pR.InputsBuffer.GetByFrameId(j2)
|
||||||
if nil != tmp2 {
|
if nil != tmp2 {
|
||||||
prevInputFrameDownsync := tmp2.(*pb.InputFrameDownsync)
|
prevInputFrameDownsync := tmp2.(*battle.InputFrameDownsync)
|
||||||
for i, _ := range currInputFrameDownsync.InputList {
|
for i, _ := range currInputFrameDownsync.InputList {
|
||||||
currInputFrameDownsync.InputList[i] = (prevInputFrameDownsync.InputList[i] & uint64(15)) // Don't predict attack input!
|
currInputFrameDownsync.InputList[i] = (prevInputFrameDownsync.InputList[i] & uint64(15)) // Don't predict attack input!
|
||||||
}
|
}
|
||||||
@ -1102,7 +1087,7 @@ func (pR *Room) getOrPrefabInputFrameDownsync(inputFrameId int32) *pb.InputFrame
|
|||||||
pR.InputsBuffer.Put(currInputFrameDownsync)
|
pR.InputsBuffer.Put(currInputFrameDownsync)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
currInputFrameDownsync = tmp1.(*pb.InputFrameDownsync)
|
currInputFrameDownsync = tmp1.(*battle.InputFrameDownsync)
|
||||||
}
|
}
|
||||||
|
|
||||||
return currInputFrameDownsync
|
return currInputFrameDownsync
|
||||||
@ -1148,7 +1133,7 @@ func (pR *Room) markConfirmationIfApplicable(inputFrameUpsyncBatch []*pb.InputFr
|
|||||||
panic(fmt.Sprintf("inputFrameId=%v doesn't exist for roomId=%v! InputsBuffer=%v", inputFrameId, pR.Id, pR.InputsBufferString(false)))
|
panic(fmt.Sprintf("inputFrameId=%v doesn't exist for roomId=%v! InputsBuffer=%v", inputFrameId, pR.Id, pR.InputsBufferString(false)))
|
||||||
}
|
}
|
||||||
shouldBreakConfirmation := false
|
shouldBreakConfirmation := false
|
||||||
inputFrameDownsync := tmp.(*pb.InputFrameDownsync)
|
inputFrameDownsync := tmp.(*battle.InputFrameDownsync)
|
||||||
|
|
||||||
if allConfirmedMask != inputFrameDownsync.ConfirmedList {
|
if allConfirmedMask != inputFrameDownsync.ConfirmedList {
|
||||||
for _, player := range pR.PlayersArr {
|
for _, player := range pR.PlayersArr {
|
||||||
@ -1207,7 +1192,7 @@ func (pR *Room) forceConfirmationIfApplicable(prevRenderFrameId int32) uint64 {
|
|||||||
if nil == tmp {
|
if nil == tmp {
|
||||||
panic(fmt.Sprintf("inputFrameId=%v doesn't exist for roomId=%v! InputsBuffer=%v", j, pR.Id, pR.InputsBufferString(false)))
|
panic(fmt.Sprintf("inputFrameId=%v doesn't exist for roomId=%v! InputsBuffer=%v", j, pR.Id, pR.InputsBufferString(false)))
|
||||||
}
|
}
|
||||||
inputFrameDownsync := tmp.(*pb.InputFrameDownsync)
|
inputFrameDownsync := tmp.(*battle.InputFrameDownsync)
|
||||||
unconfirmedMask |= (allConfirmedMask ^ inputFrameDownsync.ConfirmedList)
|
unconfirmedMask |= (allConfirmedMask ^ inputFrameDownsync.ConfirmedList)
|
||||||
inputFrameDownsync.ConfirmedList = allConfirmedMask
|
inputFrameDownsync.ConfirmedList = allConfirmedMask
|
||||||
pR.onInputFrameDownsyncAllConfirmed(inputFrameDownsync, -1)
|
pR.onInputFrameDownsyncAllConfirmed(inputFrameDownsync, -1)
|
||||||
@ -1265,8 +1250,6 @@ func (pR *Room) applyInputFrameDownsyncDynamics(fromRenderFrameId int32, toRende
|
|||||||
}
|
}
|
||||||
currRenderFrame := currRenderFrameTmp.(*battle.RoomDownsyncFrame)
|
currRenderFrame := currRenderFrameTmp.(*battle.RoomDownsyncFrame)
|
||||||
delayedInputFrameId := pR.ConvertToInputFrameId(collisionSysRenderFrameId, pR.InputDelayFrames)
|
delayedInputFrameId := pR.ConvertToInputFrameId(collisionSysRenderFrameId, pR.InputDelayFrames)
|
||||||
var delayedInputList *[]uint64 = nil
|
|
||||||
var delayedInputListForPrevRenderFrame *[]uint64 = nil
|
|
||||||
if 0 <= delayedInputFrameId {
|
if 0 <= delayedInputFrameId {
|
||||||
if delayedInputFrameId > pR.LastAllConfirmedInputFrameId {
|
if delayedInputFrameId > pR.LastAllConfirmedInputFrameId {
|
||||||
panic(fmt.Sprintf("delayedInputFrameId=%v is not yet all-confirmed for roomId=%v, this is abnormal because it's to be used for applying dynamics to [fromRenderFrameId:%v, toRenderFrameId:%v) @ collisionSysRenderFrameId=%v! InputsBuffer=%v", delayedInputFrameId, pR.Id, fromRenderFrameId, toRenderFrameId, collisionSysRenderFrameId, pR.InputsBufferString(false)))
|
panic(fmt.Sprintf("delayedInputFrameId=%v is not yet all-confirmed for roomId=%v, this is abnormal because it's to be used for applying dynamics to [fromRenderFrameId:%v, toRenderFrameId:%v) @ collisionSysRenderFrameId=%v! InputsBuffer=%v", delayedInputFrameId, pR.Id, fromRenderFrameId, toRenderFrameId, collisionSysRenderFrameId, pR.InputsBufferString(false)))
|
||||||
@ -1275,21 +1258,11 @@ func (pR *Room) applyInputFrameDownsyncDynamics(fromRenderFrameId int32, toRende
|
|||||||
if nil == tmp {
|
if nil == tmp {
|
||||||
panic(fmt.Sprintf("delayedInputFrameId=%v doesn't exist for roomId=%v, this is abnormal because it's to be used for applying dynamics to [fromRenderFrameId:%v, toRenderFrameId:%v) @ collisionSysRenderFrameId=%v! InputsBuffer=%v", delayedInputFrameId, pR.Id, fromRenderFrameId, toRenderFrameId, collisionSysRenderFrameId, pR.InputsBufferString(false)))
|
panic(fmt.Sprintf("delayedInputFrameId=%v doesn't exist for roomId=%v, this is abnormal because it's to be used for applying dynamics to [fromRenderFrameId:%v, toRenderFrameId:%v) @ collisionSysRenderFrameId=%v! InputsBuffer=%v", delayedInputFrameId, pR.Id, fromRenderFrameId, toRenderFrameId, collisionSysRenderFrameId, pR.InputsBufferString(false)))
|
||||||
}
|
}
|
||||||
delayedInputFrame := tmp.(*pb.InputFrameDownsync)
|
|
||||||
delayedInputList = &delayedInputFrame.InputList
|
|
||||||
delayedInputFrameIdForPrevRenderFrame := pR.ConvertToInputFrameId(collisionSysRenderFrameId-1, pR.InputDelayFrames)
|
|
||||||
if 0 <= delayedInputFrameIdForPrevRenderFrame {
|
|
||||||
tmp = pR.InputsBuffer.GetByFrameId(delayedInputFrameIdForPrevRenderFrame)
|
|
||||||
if nil == tmp {
|
|
||||||
panic(fmt.Sprintf("delayedInputFrameIdForPrevRenderFrame=%v doesn't exist for roomId=%v, this is abnormal because it's to be used for applying dynamics to [fromRenderFrameId:%v, toRenderFrameId:%v) @ collisionSysRenderFrameId-1=%v! InputsBuffer=%v", delayedInputFrameIdForPrevRenderFrame, pR.Id, fromRenderFrameId, toRenderFrameId, collisionSysRenderFrameId-1, pR.InputsBufferString(false)))
|
|
||||||
}
|
|
||||||
delayedInputFrameForPrevRenderFrame := tmp.(*pb.InputFrameDownsync)
|
|
||||||
delayedInputListForPrevRenderFrame = &delayedInputFrameForPrevRenderFrame.InputList
|
|
||||||
}
|
|
||||||
|
|
||||||
if pR.FrameDataLoggingEnabled {
|
if pR.FrameDataLoggingEnabled {
|
||||||
actuallyUsedInputClone := make([]uint64, len(*delayedInputList), len(*delayedInputList))
|
delayedInputFrame := tmp.(*battle.InputFrameDownsync)
|
||||||
for i, v := range *delayedInputList {
|
actuallyUsedInputClone := make([]uint64, len(delayedInputFrame.InputList), len(delayedInputFrame.InputList))
|
||||||
|
for i, v := range delayedInputFrame.InputList {
|
||||||
actuallyUsedInputClone[i] = v
|
actuallyUsedInputClone[i] = v
|
||||||
}
|
}
|
||||||
pR.rdfIdToActuallyUsedInput[currRenderFrame.Id] = &pb.InputFrameDownsync{
|
pR.rdfIdToActuallyUsedInput[currRenderFrame.Id] = &pb.InputFrameDownsync{
|
||||||
@ -1300,7 +1273,7 @@ func (pR *Room) applyInputFrameDownsyncDynamics(fromRenderFrameId int32, toRende
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nextRenderFrame := battle.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(*delayedInputList, *delayedInputListForPrevRenderFrame, currRenderFrame, pR.Space, pR.CollisionSysMap, pR.GravityX, pR.GravityY, pR.JumpingInitVelY, pR.InputDelayFrames, pR.InputScaleFrames, pR.collisionSpaceOffsetX, pR.collisionSpaceOffsetY, pR.SnapIntoPlatformOverlap, pR.SnapIntoPlatformThreshold, pR.WorldToVirtualGridRatio, pR.VirtualGridToWorldRatio)
|
nextRenderFrame := battle.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(pR.InputsBuffer, currRenderFrame, pR.Space, pR.CollisionSysMap, pR.GravityX, pR.GravityY, pR.JumpingInitVelY, pR.InputDelayFrames, pR.InputScaleFrames, pR.collisionSpaceOffsetX, pR.collisionSpaceOffsetY, pR.SnapIntoPlatformOverlap, pR.SnapIntoPlatformThreshold, pR.WorldToVirtualGridRatio, pR.VirtualGridToWorldRatio, pR.playerOpPatternToSkillId)
|
||||||
pR.RenderFrameBuffer.Put(nextRenderFrame)
|
pR.RenderFrameBuffer.Put(nextRenderFrame)
|
||||||
pR.CurDynamicsRenderFrameId++
|
pR.CurDynamicsRenderFrameId++
|
||||||
}
|
}
|
||||||
@ -1497,6 +1470,7 @@ func (pR *Room) downsyncToSinglePlayer(playerId int32, player *Player, refRender
|
|||||||
}
|
}
|
||||||
|
|
||||||
refRenderFrame := tmp.(*battle.RoomDownsyncFrame)
|
refRenderFrame := tmp.(*battle.RoomDownsyncFrame)
|
||||||
|
refRenderFrame.PlayerOpPatternToSkillId = pR.playerOpPatternToSkillId
|
||||||
for i, player := range pR.PlayersArr {
|
for i, player := range pR.PlayersArr {
|
||||||
refRenderFrame.PlayersArr[i].ColliderRadius = player.ColliderRadius // hardcoded for now
|
refRenderFrame.PlayersArr[i].ColliderRadius = player.ColliderRadius // hardcoded for now
|
||||||
}
|
}
|
||||||
@ -1534,7 +1508,7 @@ func (pR *Room) cloneInputsBuffer(stFrameId, edFrameId int32) []*pb.InputFrameDo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
prevFrameFound = true
|
prevFrameFound = true
|
||||||
foo := tmp.(*pb.InputFrameDownsync)
|
foo := tmp.(*battle.InputFrameDownsync)
|
||||||
|
|
||||||
bar := &pb.InputFrameDownsync{
|
bar := &pb.InputFrameDownsync{
|
||||||
InputFrameId: foo.InputFrameId,
|
InputFrameId: foo.InputFrameId,
|
||||||
|
@ -954,13 +954,12 @@ type BattleColliderInfo struct {
|
|||||||
VirtualGridToWorldRatio float64 `protobuf:"fixed64,21,opt,name=virtualGridToWorldRatio,proto3" json:"virtualGridToWorldRatio,omitempty"`
|
VirtualGridToWorldRatio float64 `protobuf:"fixed64,21,opt,name=virtualGridToWorldRatio,proto3" json:"virtualGridToWorldRatio,omitempty"`
|
||||||
SpAtkLookupFrames int32 `protobuf:"varint,22,opt,name=spAtkLookupFrames,proto3" json:"spAtkLookupFrames,omitempty"`
|
SpAtkLookupFrames int32 `protobuf:"varint,22,opt,name=spAtkLookupFrames,proto3" json:"spAtkLookupFrames,omitempty"`
|
||||||
RenderCacheSize int32 `protobuf:"varint,23,opt,name=renderCacheSize,proto3" json:"renderCacheSize,omitempty"`
|
RenderCacheSize int32 `protobuf:"varint,23,opt,name=renderCacheSize,proto3" json:"renderCacheSize,omitempty"`
|
||||||
MeleeSkillConfig map[int32]*MeleeBullet `protobuf:"bytes,24,rep,name=meleeSkillConfig,proto3" json:"meleeSkillConfig,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // skillId -> skill
|
SnapIntoPlatformOverlap float64 `protobuf:"fixed64,24,opt,name=snapIntoPlatformOverlap,proto3" json:"snapIntoPlatformOverlap,omitempty"`
|
||||||
SnapIntoPlatformOverlap float64 `protobuf:"fixed64,25,opt,name=snapIntoPlatformOverlap,proto3" json:"snapIntoPlatformOverlap,omitempty"`
|
SnapIntoPlatformThreshold float64 `protobuf:"fixed64,25,opt,name=snapIntoPlatformThreshold,proto3" json:"snapIntoPlatformThreshold,omitempty"`
|
||||||
SnapIntoPlatformThreshold float64 `protobuf:"fixed64,26,opt,name=snapIntoPlatformThreshold,proto3" json:"snapIntoPlatformThreshold,omitempty"`
|
JumpingInitVelY int32 `protobuf:"varint,26,opt,name=jumpingInitVelY,proto3" json:"jumpingInitVelY,omitempty"`
|
||||||
JumpingInitVelY int32 `protobuf:"varint,27,opt,name=jumpingInitVelY,proto3" json:"jumpingInitVelY,omitempty"`
|
GravityX int32 `protobuf:"varint,27,opt,name=gravityX,proto3" json:"gravityX,omitempty"`
|
||||||
GravityX int32 `protobuf:"varint,28,opt,name=gravityX,proto3" json:"gravityX,omitempty"`
|
GravityY int32 `protobuf:"varint,28,opt,name=gravityY,proto3" json:"gravityY,omitempty"`
|
||||||
GravityY int32 `protobuf:"varint,29,opt,name=gravityY,proto3" json:"gravityY,omitempty"`
|
CollisionMinStep int32 `protobuf:"varint,29,opt,name=collisionMinStep,proto3" json:"collisionMinStep,omitempty"`
|
||||||
CollisionMinStep int32 `protobuf:"varint,30,opt,name=collisionMinStep,proto3" json:"collisionMinStep,omitempty"`
|
|
||||||
FrameDataLoggingEnabled bool `protobuf:"varint,999,opt,name=frameDataLoggingEnabled,proto3" json:"frameDataLoggingEnabled,omitempty"`
|
FrameDataLoggingEnabled bool `protobuf:"varint,999,opt,name=frameDataLoggingEnabled,proto3" json:"frameDataLoggingEnabled,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1157,13 +1156,6 @@ func (x *BattleColliderInfo) GetRenderCacheSize() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BattleColliderInfo) GetMeleeSkillConfig() map[int32]*MeleeBullet {
|
|
||||||
if x != nil {
|
|
||||||
return x.MeleeSkillConfig
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *BattleColliderInfo) GetSnapIntoPlatformOverlap() float64 {
|
func (x *BattleColliderInfo) GetSnapIntoPlatformOverlap() float64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.SnapIntoPlatformOverlap
|
return x.SnapIntoPlatformOverlap
|
||||||
@ -1224,6 +1216,7 @@ type RoomDownsyncFrame struct {
|
|||||||
MeleeBullets []*MeleeBullet `protobuf:"bytes,4,rep,name=meleeBullets,proto3" json:"meleeBullets,omitempty"` // I don't know how to mimic inheritance/composition in protobuf by far, thus using an array for each type of bullet as a compromise
|
MeleeBullets []*MeleeBullet `protobuf:"bytes,4,rep,name=meleeBullets,proto3" json:"meleeBullets,omitempty"` // I don't know how to mimic inheritance/composition in protobuf by far, thus using an array for each type of bullet as a compromise
|
||||||
BackendUnconfirmedMask uint64 `protobuf:"varint,5,opt,name=backendUnconfirmedMask,proto3" json:"backendUnconfirmedMask,omitempty"` // Indexed by "joinIndex", same compression concern as stated in InputFrameDownsync
|
BackendUnconfirmedMask uint64 `protobuf:"varint,5,opt,name=backendUnconfirmedMask,proto3" json:"backendUnconfirmedMask,omitempty"` // Indexed by "joinIndex", same compression concern as stated in InputFrameDownsync
|
||||||
ShouldForceResync bool `protobuf:"varint,6,opt,name=shouldForceResync,proto3" json:"shouldForceResync,omitempty"`
|
ShouldForceResync bool `protobuf:"varint,6,opt,name=shouldForceResync,proto3" json:"shouldForceResync,omitempty"`
|
||||||
|
PlayerOpPatternToSkillId map[int32]int32 `protobuf:"bytes,7,rep,name=playerOpPatternToSkillId,proto3" json:"playerOpPatternToSkillId,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RoomDownsyncFrame) Reset() {
|
func (x *RoomDownsyncFrame) Reset() {
|
||||||
@ -1300,6 +1293,13 @@ func (x *RoomDownsyncFrame) GetShouldForceResync() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *RoomDownsyncFrame) GetPlayerOpPatternToSkillId() map[int32]int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.PlayerOpPatternToSkillId
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
var File_room_downsync_frame_proto protoreflect.FileDescriptor
|
var File_room_downsync_frame_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_room_downsync_frame_proto_rawDesc = []byte{
|
var file_room_downsync_frame_proto_rawDesc = []byte{
|
||||||
@ -1470,7 +1470,7 @@ var file_room_downsync_frame_proto_rawDesc = []byte{
|
|||||||
0x6c, 0x66, 0x4d, 0x6f, 0x76, 0x65, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x58, 0x12, 0x2a,
|
0x6c, 0x66, 0x4d, 0x6f, 0x76, 0x65, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x58, 0x12, 0x2a,
|
||||||
0x0a, 0x10, 0x73, 0x65, 0x6c, 0x66, 0x4d, 0x6f, 0x76, 0x65, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72,
|
0x0a, 0x10, 0x73, 0x65, 0x6c, 0x66, 0x4d, 0x6f, 0x76, 0x65, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72,
|
||||||
0x64, 0x59, 0x18, 0x13, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x73, 0x65, 0x6c, 0x66, 0x4d, 0x6f,
|
0x64, 0x59, 0x18, 0x13, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x73, 0x65, 0x6c, 0x66, 0x4d, 0x6f,
|
||||||
0x76, 0x65, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x59, 0x22, 0xc5, 0x0c, 0x0a, 0x12, 0x42,
|
0x76, 0x65, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x59, 0x22, 0x8d, 0x0b, 0x0a, 0x12, 0x42,
|
||||||
0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66,
|
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,
|
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,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12,
|
||||||
@ -1539,59 +1539,59 @@ var file_room_downsync_frame_proto_rawDesc = []byte{
|
|||||||
0x41, 0x74, 0x6b, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12,
|
0x41, 0x74, 0x6b, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12,
|
||||||
0x28, 0x0a, 0x0f, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69,
|
0x28, 0x0a, 0x0f, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69,
|
||||||
0x7a, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72,
|
0x7a, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72,
|
||||||
0x43, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x5c, 0x0a, 0x10, 0x6d, 0x65, 0x6c,
|
0x43, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x38, 0x0a, 0x17, 0x73, 0x6e, 0x61,
|
||||||
0x65, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x18, 0x20,
|
0x70, 0x49, 0x6e, 0x74, 0x6f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4f, 0x76, 0x65,
|
||||||
0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x74,
|
0x72, 0x6c, 0x61, 0x70, 0x18, 0x18, 0x20, 0x01, 0x28, 0x01, 0x52, 0x17, 0x73, 0x6e, 0x61, 0x70,
|
||||||
0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e,
|
0x49, 0x6e, 0x74, 0x6f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4f, 0x76, 0x65, 0x72,
|
||||||
0x4d, 0x65, 0x6c, 0x65, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
0x6c, 0x61, 0x70, 0x12, 0x3c, 0x0a, 0x19, 0x73, 0x6e, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x50,
|
||||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x53, 0x6b, 0x69, 0x6c,
|
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64,
|
||||||
0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x17, 0x73, 0x6e, 0x61, 0x70, 0x49,
|
0x18, 0x19, 0x20, 0x01, 0x28, 0x01, 0x52, 0x19, 0x73, 0x6e, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x6f,
|
||||||
0x6e, 0x74, 0x6f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4f, 0x76, 0x65, 0x72, 0x6c,
|
0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c,
|
||||||
0x61, 0x70, 0x18, 0x19, 0x20, 0x01, 0x28, 0x01, 0x52, 0x17, 0x73, 0x6e, 0x61, 0x70, 0x49, 0x6e,
|
0x64, 0x12, 0x28, 0x0a, 0x0f, 0x6a, 0x75, 0x6d, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x69, 0x74,
|
||||||
0x74, 0x6f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x61,
|
0x56, 0x65, 0x6c, 0x59, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x6a, 0x75, 0x6d, 0x70,
|
||||||
0x70, 0x12, 0x3c, 0x0a, 0x19, 0x73, 0x6e, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x50, 0x6c, 0x61,
|
0x69, 0x6e, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x56, 0x65, 0x6c, 0x59, 0x12, 0x1a, 0x0a, 0x08, 0x67,
|
||||||
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x1a,
|
0x72, 0x61, 0x76, 0x69, 0x74, 0x79, 0x58, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67,
|
||||||
0x20, 0x01, 0x28, 0x01, 0x52, 0x19, 0x73, 0x6e, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x50, 0x6c,
|
0x72, 0x61, 0x76, 0x69, 0x74, 0x79, 0x58, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x76, 0x69,
|
||||||
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12,
|
0x74, 0x79, 0x59, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x61, 0x76, 0x69,
|
||||||
0x28, 0x0a, 0x0f, 0x6a, 0x75, 0x6d, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x56, 0x65,
|
0x74, 0x79, 0x59, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e,
|
||||||
0x6c, 0x59, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x6a, 0x75, 0x6d, 0x70, 0x69, 0x6e,
|
0x4d, 0x69, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63,
|
||||||
0x67, 0x49, 0x6e, 0x69, 0x74, 0x56, 0x65, 0x6c, 0x59, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x61,
|
0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x12,
|
||||||
0x76, 0x69, 0x74, 0x79, 0x58, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x61,
|
0x39, 0x0a, 0x17, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67,
|
||||||
0x76, 0x69, 0x74, 0x79, 0x58, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x79,
|
0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0xe7, 0x07, 0x20, 0x01, 0x28,
|
||||||
0x59, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x79,
|
0x08, 0x52, 0x17, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67,
|
||||||
0x59, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x69,
|
0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xe4, 0x03, 0x0a, 0x11, 0x52,
|
||||||
0x6e, 0x53, 0x74, 0x65, 0x70, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63, 0x6f, 0x6c,
|
0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65,
|
||||||
0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x12, 0x39, 0x0a,
|
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64,
|
||||||
0x17, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e,
|
0x12, 0x36, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x41, 0x72, 0x72, 0x18, 0x02,
|
||||||
0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0xe7, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52,
|
0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x6c,
|
||||||
0x17, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e,
|
0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x0a, 0x70, 0x6c,
|
||||||
0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0x58, 0x0a, 0x15, 0x4d, 0x65, 0x6c, 0x65,
|
0x61, 0x79, 0x65, 0x72, 0x73, 0x41, 0x72, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e,
|
||||||
0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72,
|
0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
|
||||||
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
|
0x52, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73,
|
||||||
0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
|
0x12, 0x37, 0x0a, 0x0c, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73,
|
||||||
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x6c, 0x65,
|
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e,
|
||||||
0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
|
0x4d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x0c, 0x6d, 0x65, 0x6c,
|
||||||
0x38, 0x01, 0x22, 0xa2, 0x02, 0x0a, 0x11, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73,
|
0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x16, 0x62, 0x61, 0x63,
|
||||||
0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
|
0x6b, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d,
|
||||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x79,
|
0x61, 0x73, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65,
|
||||||
0x65, 0x72, 0x73, 0x41, 0x72, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70,
|
0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e,
|
0x6b, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65,
|
||||||
0x73, 0x79, 0x6e, 0x63, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x41, 0x72, 0x72,
|
0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x73, 0x68,
|
||||||
0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e,
|
0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x12,
|
||||||
0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64,
|
0x73, 0x0a, 0x18, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x50, 0x61, 0x74, 0x74, 0x65,
|
||||||
0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x6d, 0x65, 0x6c, 0x65,
|
0x72, 0x6e, 0x54, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x64, 0x18, 0x07, 0x20, 0x03, 0x28,
|
||||||
0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13,
|
0x0b, 0x32, 0x37, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44,
|
||||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c,
|
0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x2e, 0x50, 0x6c, 0x61,
|
||||||
0x6c, 0x65, 0x74, 0x52, 0x0c, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74,
|
0x79, 0x65, 0x72, 0x4f, 0x70, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x54, 0x6f, 0x53, 0x6b,
|
||||||
0x73, 0x12, 0x36, 0x0a, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f,
|
0x69, 0x6c, 0x6c, 0x49, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x18, 0x70, 0x6c, 0x61, 0x79,
|
||||||
0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28,
|
0x65, 0x72, 0x4f, 0x70, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x54, 0x6f, 0x53, 0x6b, 0x69,
|
||||||
0x04, 0x52, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66,
|
0x6c, 0x6c, 0x49, 0x64, 0x1a, 0x4b, 0x0a, 0x1d, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70,
|
||||||
0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x6f,
|
0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x54, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x64,
|
||||||
0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x06,
|
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63,
|
0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||||
0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x13, 0x5a, 0x11, 0x62, 0x61, 0x74, 0x74, 0x6c,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
||||||
0x65, 0x5f, 0x73, 0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x62, 0x06, 0x70, 0x72,
|
0x01, 0x42, 0x13, 0x5a, 0x11, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x73, 0x72, 0x76, 0x2f,
|
||||||
0x6f, 0x74, 0x6f, 0x33,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -1619,7 +1619,7 @@ var file_room_downsync_frame_proto_goTypes = []interface{}{
|
|||||||
(*MeleeBullet)(nil), // 8: protos.MeleeBullet
|
(*MeleeBullet)(nil), // 8: protos.MeleeBullet
|
||||||
(*BattleColliderInfo)(nil), // 9: protos.BattleColliderInfo
|
(*BattleColliderInfo)(nil), // 9: protos.BattleColliderInfo
|
||||||
(*RoomDownsyncFrame)(nil), // 10: protos.RoomDownsyncFrame
|
(*RoomDownsyncFrame)(nil), // 10: protos.RoomDownsyncFrame
|
||||||
nil, // 11: protos.BattleColliderInfo.MeleeSkillConfigEntry
|
nil, // 11: protos.RoomDownsyncFrame.PlayerOpPatternToSkillIdEntry
|
||||||
}
|
}
|
||||||
var file_room_downsync_frame_proto_depIdxs = []int32{
|
var file_room_downsync_frame_proto_depIdxs = []int32{
|
||||||
2, // 0: protos.WsReq.inputFrameUpsyncBatch:type_name -> protos.InputFrameUpsync
|
2, // 0: protos.WsReq.inputFrameUpsyncBatch:type_name -> protos.InputFrameUpsync
|
||||||
@ -1628,15 +1628,14 @@ var file_room_downsync_frame_proto_depIdxs = []int32{
|
|||||||
3, // 3: protos.WsResp.inputFrameDownsyncBatch:type_name -> protos.InputFrameDownsync
|
3, // 3: protos.WsResp.inputFrameDownsyncBatch:type_name -> protos.InputFrameDownsync
|
||||||
9, // 4: protos.WsResp.bciFrame:type_name -> protos.BattleColliderInfo
|
9, // 4: protos.WsResp.bciFrame:type_name -> protos.BattleColliderInfo
|
||||||
3, // 5: protos.InputsBufferSnapshot.toSendInputFrameDownsyncs:type_name -> protos.InputFrameDownsync
|
3, // 5: protos.InputsBufferSnapshot.toSendInputFrameDownsyncs:type_name -> protos.InputFrameDownsync
|
||||||
11, // 6: protos.BattleColliderInfo.meleeSkillConfig:type_name -> protos.BattleColliderInfo.MeleeSkillConfigEntry
|
0, // 6: protos.RoomDownsyncFrame.playersArr:type_name -> protos.PlayerDownsync
|
||||||
0, // 7: protos.RoomDownsyncFrame.playersArr:type_name -> protos.PlayerDownsync
|
8, // 7: protos.RoomDownsyncFrame.meleeBullets:type_name -> protos.MeleeBullet
|
||||||
8, // 8: protos.RoomDownsyncFrame.meleeBullets:type_name -> protos.MeleeBullet
|
11, // 8: protos.RoomDownsyncFrame.playerOpPatternToSkillId:type_name -> protos.RoomDownsyncFrame.PlayerOpPatternToSkillIdEntry
|
||||||
8, // 9: protos.BattleColliderInfo.MeleeSkillConfigEntry.value:type_name -> protos.MeleeBullet
|
9, // [9:9] is the sub-list for method output_type
|
||||||
10, // [10:10] is the sub-list for method output_type
|
9, // [9:9] is the sub-list for method input_type
|
||||||
10, // [10:10] is the sub-list for method input_type
|
9, // [9:9] is the sub-list for extension type_name
|
||||||
10, // [10:10] is the sub-list for extension type_name
|
9, // [9:9] is the sub-list for extension extendee
|
||||||
10, // [10:10] is the sub-list for extension extendee
|
0, // [0:9] is the sub-list for field type_name
|
||||||
0, // [0:10] is the sub-list for field type_name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_room_downsync_frame_proto_init() }
|
func init() { file_room_downsync_frame_proto_init() }
|
||||||
|
@ -265,7 +265,6 @@ func Serve(c *gin.Context) {
|
|||||||
|
|
||||||
SpAtkLookupFrames: pRoom.SpAtkLookupFrames,
|
SpAtkLookupFrames: pRoom.SpAtkLookupFrames,
|
||||||
RenderCacheSize: pRoom.RenderCacheSize,
|
RenderCacheSize: pRoom.RenderCacheSize,
|
||||||
MeleeSkillConfig: pRoom.MeleeSkillConfig,
|
|
||||||
SnapIntoPlatformOverlap: pRoom.SnapIntoPlatformOverlap,
|
SnapIntoPlatformOverlap: pRoom.SnapIntoPlatformOverlap,
|
||||||
SnapIntoPlatformThreshold: pRoom.SnapIntoPlatformThreshold,
|
SnapIntoPlatformThreshold: pRoom.SnapIntoPlatformThreshold,
|
||||||
JumpingInitVelY: pRoom.JumpingInitVelY,
|
JumpingInitVelY: pRoom.JumpingInitVelY,
|
||||||
|
@ -4724,7 +4724,7 @@ $packages["resolv"] = (function() {
|
|||||||
return $pkg;
|
return $pkg;
|
||||||
})();
|
})();
|
||||||
$packages["jsexport/battle"] = (function() {
|
$packages["jsexport/battle"] = (function() {
|
||||||
var $pkg = {}, $init, math, resolv, Vec2D, Polygon2D, PlayerDownsync, InputFrameDecoded, Barrier, Bullet, MeleeBullet, FireballBullet, RoomDownsyncFrame, InputFrameDownsync, RingBuffer, SatResult, sliceType, sliceType$1, sliceType$2, ptrType, sliceType$3, sliceType$4, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, sliceType$5, sliceType$6, sliceType$7, sliceType$8, ptrType$7, sliceType$9, ptrType$8, sliceType$10, sliceType$11, ptrType$9, sliceType$12, ptrType$10, ptrType$11, skillIdToBullet, NewRingBuffer, ConvertToInputFrameId, decodeInput, CalcPushbacks, isPolygonPairOverlapped, isPolygonPairSeparatedByDir, WorldToVirtualGridPos, VirtualGridToWorldPos, WorldToPolygonColliderBLPos, PolygonColliderBLToWorldPos, PolygonColliderBLToVirtualGridPos, VirtualGridToPolygonColliderBLPos, calcHardPushbacksNorms, deriveOpPattern, ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame, GenerateRectCollider, generateRectColliderInCollisionSpace, GenerateConvexPolygonCollider, AlignPolygon2DToBoundingBox;
|
var $pkg = {}, $init, math, resolv, Vec2D, Polygon2D, PlayerDownsync, InputFrameDecoded, Barrier, Bullet, MeleeBullet, FireballBullet, RoomDownsyncFrame, InputFrameDownsync, RingBuffer, SatResult, sliceType, sliceType$1, sliceType$2, ptrType, sliceType$3, sliceType$4, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, sliceType$5, sliceType$6, sliceType$7, sliceType$8, ptrType$7, sliceType$9, ptrType$8, sliceType$10, sliceType$11, ptrType$9, sliceType$12, ptrType$10, mapType, ptrType$11, skillIdToBullet, NewRingBuffer, ConvertToInputFrameId, decodeInput, CalcPushbacks, isPolygonPairOverlapped, isPolygonPairSeparatedByDir, WorldToVirtualGridPos, VirtualGridToWorldPos, WorldToPolygonColliderBLPos, PolygonColliderBLToWorldPos, PolygonColliderBLToVirtualGridPos, VirtualGridToPolygonColliderBLPos, calcHardPushbacksNorms, deriveOpPattern, ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame, GenerateRectCollider, generateRectColliderInCollisionSpace, GenerateConvexPolygonCollider, AlignPolygon2DToBoundingBox;
|
||||||
math = $packages["math"];
|
math = $packages["math"];
|
||||||
resolv = $packages["resolv"];
|
resolv = $packages["resolv"];
|
||||||
Vec2D = $pkg.Vec2D = $newType(0, $kindStruct, "battle.Vec2D", true, "jsexport/battle", true, function(X_, Y_) {
|
Vec2D = $pkg.Vec2D = $newType(0, $kindStruct, "battle.Vec2D", true, "jsexport/battle", true, function(X_, Y_) {
|
||||||
@ -4887,7 +4887,7 @@ $packages["jsexport/battle"] = (function() {
|
|||||||
this.Speed = Speed_;
|
this.Speed = Speed_;
|
||||||
this.Bullet = Bullet_;
|
this.Bullet = Bullet_;
|
||||||
});
|
});
|
||||||
RoomDownsyncFrame = $pkg.RoomDownsyncFrame = $newType(0, $kindStruct, "battle.RoomDownsyncFrame", true, "jsexport/battle", true, function(Id_, PlayersArr_, CountdownNanos_, MeleeBullets_, FireballBullets_, BackendUnconfirmedMask_, ShouldForceResync_) {
|
RoomDownsyncFrame = $pkg.RoomDownsyncFrame = $newType(0, $kindStruct, "battle.RoomDownsyncFrame", true, "jsexport/battle", true, function(Id_, PlayersArr_, CountdownNanos_, MeleeBullets_, FireballBullets_, BackendUnconfirmedMask_, ShouldForceResync_, PlayerOpPatternToSkillId_) {
|
||||||
this.$val = this;
|
this.$val = this;
|
||||||
if (arguments.length === 0) {
|
if (arguments.length === 0) {
|
||||||
this.Id = 0;
|
this.Id = 0;
|
||||||
@ -4897,6 +4897,7 @@ $packages["jsexport/battle"] = (function() {
|
|||||||
this.FireballBullets = sliceType$10.nil;
|
this.FireballBullets = sliceType$10.nil;
|
||||||
this.BackendUnconfirmedMask = new $Uint64(0, 0);
|
this.BackendUnconfirmedMask = new $Uint64(0, 0);
|
||||||
this.ShouldForceResync = false;
|
this.ShouldForceResync = false;
|
||||||
|
this.PlayerOpPatternToSkillId = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.Id = Id_;
|
this.Id = Id_;
|
||||||
@ -4906,6 +4907,7 @@ $packages["jsexport/battle"] = (function() {
|
|||||||
this.FireballBullets = FireballBullets_;
|
this.FireballBullets = FireballBullets_;
|
||||||
this.BackendUnconfirmedMask = BackendUnconfirmedMask_;
|
this.BackendUnconfirmedMask = BackendUnconfirmedMask_;
|
||||||
this.ShouldForceResync = ShouldForceResync_;
|
this.ShouldForceResync = ShouldForceResync_;
|
||||||
|
this.PlayerOpPatternToSkillId = PlayerOpPatternToSkillId_;
|
||||||
});
|
});
|
||||||
InputFrameDownsync = $pkg.InputFrameDownsync = $newType(0, $kindStruct, "battle.InputFrameDownsync", true, "jsexport/battle", true, function(InputFrameId_, InputList_, ConfirmedList_) {
|
InputFrameDownsync = $pkg.InputFrameDownsync = $newType(0, $kindStruct, "battle.InputFrameDownsync", true, "jsexport/battle", true, function(InputFrameId_, InputList_, ConfirmedList_) {
|
||||||
this.$val = this;
|
this.$val = this;
|
||||||
@ -4981,6 +4983,7 @@ $packages["jsexport/battle"] = (function() {
|
|||||||
ptrType$9 = $ptrType(Vec2D);
|
ptrType$9 = $ptrType(Vec2D);
|
||||||
sliceType$12 = $sliceType(ptrType$9);
|
sliceType$12 = $sliceType(ptrType$9);
|
||||||
ptrType$10 = $ptrType(Polygon2D);
|
ptrType$10 = $ptrType(Polygon2D);
|
||||||
|
mapType = $mapType($Int, $Int);
|
||||||
ptrType$11 = $ptrType(RingBuffer);
|
ptrType$11 = $ptrType(RingBuffer);
|
||||||
NewRingBuffer = function(n) {
|
NewRingBuffer = function(n) {
|
||||||
var n;
|
var n;
|
||||||
@ -5752,7 +5755,7 @@ $packages["jsexport/battle"] = (function() {
|
|||||||
thatPlayerInNextFrame$3.VirtualGridY = _tuple$6[1];
|
thatPlayerInNextFrame$3.VirtualGridY = _tuple$6[1];
|
||||||
_i$10++;
|
_i$10++;
|
||||||
}
|
}
|
||||||
$s = -1; return new RoomDownsyncFrame.ptr(currRenderFrame.Id + 1 >> 0, nextRenderFramePlayers, new $Int64(0, 0), nextRenderFrameMeleeBullets, sliceType$10.nil, new $Uint64(0, 0), false);
|
$s = -1; return new RoomDownsyncFrame.ptr(currRenderFrame.Id + 1 >> 0, nextRenderFramePlayers, new $Int64(0, 0), nextRenderFrameMeleeBullets, sliceType$10.nil, new $Uint64(0, 0), false, false);
|
||||||
/* */ } return; } var $f = {$blk: ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame, $c: true, $r, _1, _entry, _entry$1, _entry$2, _entry$3, _entry$4, _i, _i$1, _i$10, _i$2, _i$3, _i$4, _i$5, _i$6, _i$7, _i$8, _i$9, _index, _index$1, _index$2, _index$3, _r, _r$1, _r$2, _r$3, _ref, _ref$1, _ref$10, _ref$11, _ref$12, _ref$2, _ref$3, _ref$4, _ref$5, _ref$6, _ref$7, _ref$8, _ref$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, atkedPlayerInCurFrame, atkedPlayerInNextFrame, bShape, bulletCollider, bulletColliders, bulletShape, bulletWx, bulletWy, collision, collision$1, collisionPlayerIndex, collisionPlayerIndex$1, collisionPlayerIndex$2, collisionSpaceOffsetX, collisionSpaceOffsetY, collisionSys, collisionSysMap, currPlayerDownsync, currPlayerDownsync$1, currPlayerDownsync$2, currPlayerDownsync$3, currPlayerDownsync$4, currRenderFrame, defenderShape, effDx, effDy, effPushbacks, existent, gravityX, gravityY, hardPushbackNorm, hardPushbackNorm$1, hardPushbackNorms, i, i$1, i$2, i$3, i$4, inputDelayFrames, inputScaleFrames, inputsBuffer, isAnotherPlayer, isBarrier, isBullet, joinIndex, joinIndex$1, joinIndex$2, joinIndex$3, joinIndex$4, jumpedOrNot, jumpingInitVelY, landedOnGravityPushback, meleeBullet, meleeBullet$1, newBulletCollider, newMeleeBullet, newVx, newVy, nextRenderFrameMeleeBullets, nextRenderFramePlayers, normAlignmentWithGravity, obj, obj$1, offender, offender$1, offenderWx, offenderWy, oldFramesToRecover, oldNextCharacterState, overlapResult, overlapped, overlapped$1, patternId, playerCollider, playerCollider$1, playerCollider$2, playerOpPatternToSkillId, playerShape, projectedMagnitude, projectedMagnitude$1, pushbackX, pushbackX$1, pushbackY, pushbackY$1, roomCapacity, skillConfig, skillId, snapIntoPlatformOverlap, snapIntoPlatformThreshold, t, t$1, thatPlayerInNextFrame, thatPlayerInNextFrame$1, thatPlayerInNextFrame$2, thatPlayerInNextFrame$3, virtualGridToWorldRatio, worldToVirtualGridRatio, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, xfac, xfac$1, $s};return $f;
|
/* */ } return; } var $f = {$blk: ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame, $c: true, $r, _1, _entry, _entry$1, _entry$2, _entry$3, _entry$4, _i, _i$1, _i$10, _i$2, _i$3, _i$4, _i$5, _i$6, _i$7, _i$8, _i$9, _index, _index$1, _index$2, _index$3, _r, _r$1, _r$2, _r$3, _ref, _ref$1, _ref$10, _ref$11, _ref$12, _ref$2, _ref$3, _ref$4, _ref$5, _ref$6, _ref$7, _ref$8, _ref$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, atkedPlayerInCurFrame, atkedPlayerInNextFrame, bShape, bulletCollider, bulletColliders, bulletShape, bulletWx, bulletWy, collision, collision$1, collisionPlayerIndex, collisionPlayerIndex$1, collisionPlayerIndex$2, collisionSpaceOffsetX, collisionSpaceOffsetY, collisionSys, collisionSysMap, currPlayerDownsync, currPlayerDownsync$1, currPlayerDownsync$2, currPlayerDownsync$3, currPlayerDownsync$4, currRenderFrame, defenderShape, effDx, effDy, effPushbacks, existent, gravityX, gravityY, hardPushbackNorm, hardPushbackNorm$1, hardPushbackNorms, i, i$1, i$2, i$3, i$4, inputDelayFrames, inputScaleFrames, inputsBuffer, isAnotherPlayer, isBarrier, isBullet, joinIndex, joinIndex$1, joinIndex$2, joinIndex$3, joinIndex$4, jumpedOrNot, jumpingInitVelY, landedOnGravityPushback, meleeBullet, meleeBullet$1, newBulletCollider, newMeleeBullet, newVx, newVy, nextRenderFrameMeleeBullets, nextRenderFramePlayers, normAlignmentWithGravity, obj, obj$1, offender, offender$1, offenderWx, offenderWy, oldFramesToRecover, oldNextCharacterState, overlapResult, overlapped, overlapped$1, patternId, playerCollider, playerCollider$1, playerCollider$2, playerOpPatternToSkillId, playerShape, projectedMagnitude, projectedMagnitude$1, pushbackX, pushbackX$1, pushbackY, pushbackY$1, roomCapacity, skillConfig, skillId, snapIntoPlatformOverlap, snapIntoPlatformThreshold, t, t$1, thatPlayerInNextFrame, thatPlayerInNextFrame$1, thatPlayerInNextFrame$2, thatPlayerInNextFrame$3, virtualGridToWorldRatio, worldToVirtualGridRatio, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, xfac, xfac$1, $s};return $f;
|
||||||
};
|
};
|
||||||
$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame = ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame;
|
$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame = ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame;
|
||||||
@ -5865,7 +5868,7 @@ $packages["jsexport/battle"] = (function() {
|
|||||||
Bullet.init("", [{prop: "BattleLocalId", name: "BattleLocalId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "StartupFrames", name: "StartupFrames", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "ActiveFrames", name: "ActiveFrames", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "RecoveryFrames", name: "RecoveryFrames", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "RecoveryFramesOnBlock", name: "RecoveryFramesOnBlock", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "RecoveryFramesOnHit", name: "RecoveryFramesOnHit", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "HitboxOffset", name: "HitboxOffset", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "OriginatedRenderFrameId", name: "OriginatedRenderFrameId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "HitStunFrames", name: "HitStunFrames", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "BlockStunFrames", name: "BlockStunFrames", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Pushback", name: "Pushback", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "ReleaseTriggerType", name: "ReleaseTriggerType", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Damage", name: "Damage", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "OffenderJoinIndex", name: "OffenderJoinIndex", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "OffenderPlayerId", name: "OffenderPlayerId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "SelfMoveforwardX", name: "SelfMoveforwardX", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "SelfMoveforwardY", name: "SelfMoveforwardY", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "HitboxSizeX", name: "HitboxSizeX", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "HitboxSizeY", name: "HitboxSizeY", embedded: false, exported: true, typ: $Float64, tag: ""}]);
|
Bullet.init("", [{prop: "BattleLocalId", name: "BattleLocalId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "StartupFrames", name: "StartupFrames", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "ActiveFrames", name: "ActiveFrames", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "RecoveryFrames", name: "RecoveryFrames", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "RecoveryFramesOnBlock", name: "RecoveryFramesOnBlock", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "RecoveryFramesOnHit", name: "RecoveryFramesOnHit", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "HitboxOffset", name: "HitboxOffset", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "OriginatedRenderFrameId", name: "OriginatedRenderFrameId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "HitStunFrames", name: "HitStunFrames", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "BlockStunFrames", name: "BlockStunFrames", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Pushback", name: "Pushback", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "ReleaseTriggerType", name: "ReleaseTriggerType", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Damage", name: "Damage", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "OffenderJoinIndex", name: "OffenderJoinIndex", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "OffenderPlayerId", name: "OffenderPlayerId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "SelfMoveforwardX", name: "SelfMoveforwardX", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "SelfMoveforwardY", name: "SelfMoveforwardY", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "HitboxSizeX", name: "HitboxSizeX", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "HitboxSizeY", name: "HitboxSizeY", embedded: false, exported: true, typ: $Float64, tag: ""}]);
|
||||||
MeleeBullet.init("", [{prop: "Bullet", name: "Bullet", embedded: true, exported: true, typ: Bullet, tag: ""}]);
|
MeleeBullet.init("", [{prop: "Bullet", name: "Bullet", embedded: true, exported: true, typ: Bullet, tag: ""}]);
|
||||||
FireballBullet.init("", [{prop: "VirtualGridX", name: "VirtualGridX", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "VirtualGridY", name: "VirtualGridY", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "DirX", name: "DirX", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "DirY", name: "DirY", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "VelX", name: "VelX", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "VelY", name: "VelY", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Speed", name: "Speed", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Bullet", name: "Bullet", embedded: true, exported: true, typ: Bullet, tag: ""}]);
|
FireballBullet.init("", [{prop: "VirtualGridX", name: "VirtualGridX", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "VirtualGridY", name: "VirtualGridY", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "DirX", name: "DirX", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "DirY", name: "DirY", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "VelX", name: "VelX", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "VelY", name: "VelY", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Speed", name: "Speed", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Bullet", name: "Bullet", embedded: true, exported: true, typ: Bullet, tag: ""}]);
|
||||||
RoomDownsyncFrame.init("", [{prop: "Id", name: "Id", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "PlayersArr", name: "PlayersArr", embedded: false, exported: true, typ: sliceType$6, tag: ""}, {prop: "CountdownNanos", name: "CountdownNanos", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "MeleeBullets", name: "MeleeBullets", embedded: false, exported: true, typ: sliceType$7, tag: ""}, {prop: "FireballBullets", name: "FireballBullets", embedded: false, exported: true, typ: sliceType$10, tag: ""}, {prop: "BackendUnconfirmedMask", name: "BackendUnconfirmedMask", embedded: false, exported: true, typ: $Uint64, tag: ""}, {prop: "ShouldForceResync", name: "ShouldForceResync", embedded: false, exported: true, typ: $Bool, tag: ""}]);
|
RoomDownsyncFrame.init("", [{prop: "Id", name: "Id", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "PlayersArr", name: "PlayersArr", embedded: false, exported: true, typ: sliceType$6, tag: ""}, {prop: "CountdownNanos", name: "CountdownNanos", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "MeleeBullets", name: "MeleeBullets", embedded: false, exported: true, typ: sliceType$7, tag: ""}, {prop: "FireballBullets", name: "FireballBullets", embedded: false, exported: true, typ: sliceType$10, tag: ""}, {prop: "BackendUnconfirmedMask", name: "BackendUnconfirmedMask", embedded: false, exported: true, typ: $Uint64, tag: ""}, {prop: "ShouldForceResync", name: "ShouldForceResync", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "PlayerOpPatternToSkillId", name: "PlayerOpPatternToSkillId", embedded: false, exported: true, typ: mapType, tag: ""}]);
|
||||||
InputFrameDownsync.init("", [{prop: "InputFrameId", name: "InputFrameId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "InputList", name: "InputList", embedded: false, exported: true, typ: sliceType$5, tag: ""}, {prop: "ConfirmedList", name: "ConfirmedList", embedded: false, exported: true, typ: $Uint64, tag: ""}]);
|
InputFrameDownsync.init("", [{prop: "InputFrameId", name: "InputFrameId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "InputList", name: "InputList", embedded: false, exported: true, typ: sliceType$5, tag: ""}, {prop: "ConfirmedList", name: "ConfirmedList", embedded: false, exported: true, typ: $Uint64, tag: ""}]);
|
||||||
RingBuffer.init("", [{prop: "Ed", name: "Ed", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "St", name: "St", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "EdFrameId", name: "EdFrameId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "StFrameId", name: "StFrameId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "N", name: "N", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Cnt", name: "Cnt", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Eles", name: "Eles", embedded: false, exported: true, typ: sliceType$2, tag: ""}]);
|
RingBuffer.init("", [{prop: "Ed", name: "Ed", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "St", name: "St", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "EdFrameId", name: "EdFrameId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "StFrameId", name: "StFrameId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "N", name: "N", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Cnt", name: "Cnt", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Eles", name: "Eles", embedded: false, exported: true, typ: sliceType$2, tag: ""}]);
|
||||||
SatResult.init("", [{prop: "Overlap", name: "Overlap", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "OverlapX", name: "OverlapX", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "OverlapY", name: "OverlapY", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "AContainedInB", name: "AContainedInB", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "BContainedInA", name: "BContainedInA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Axis", name: "Axis", embedded: false, exported: true, typ: resolv.Vector, tag: ""}]);
|
SatResult.init("", [{prop: "Overlap", name: "Overlap", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "OverlapX", name: "OverlapX", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "OverlapY", name: "OverlapY", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "AContainedInB", name: "AContainedInB", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "BContainedInA", name: "BContainedInA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Axis", name: "Axis", embedded: false, exported: true, typ: resolv.Vector, tag: ""}]);
|
||||||
@ -5882,7 +5885,7 @@ $packages["jsexport/battle"] = (function() {
|
|||||||
return $pkg;
|
return $pkg;
|
||||||
})();
|
})();
|
||||||
$packages["jsexport"] = (function() {
|
$packages["jsexport"] = (function() {
|
||||||
var $pkg = {}, $init, js, battle, resolv, sliceType, ptrType, sliceType$1, ptrType$1, ptrType$2, sliceType$2, ptrType$3, sliceType$3, ptrType$4, sliceType$4, ptrType$5, sliceType$5, funcType, funcType$1, funcType$2, funcType$3, funcType$4, funcType$5, funcType$6, funcType$7, funcType$8, funcType$9, ptrType$6, funcType$10, ptrType$7, ptrType$8, ptrType$9, mapType, mapType$1, funcType$11, funcType$12, mapType$2, NewInputFrameDownsync, NewRingBufferJs, NewCollisionSpaceJs, NewVec2DJs, NewPolygon2DJs, NewBarrierJs, NewPlayerDownsyncJs, NewRoomDownsyncFrameJs, GetCollisionSpaceObjsJs, GenerateRectColliderJs, GenerateConvexPolygonColliderJs, ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs, main;
|
var $pkg = {}, $init, js, battle, resolv, sliceType, ptrType, sliceType$1, ptrType$1, ptrType$2, sliceType$2, ptrType$3, sliceType$3, ptrType$4, sliceType$4, ptrType$5, sliceType$5, funcType, funcType$1, funcType$2, funcType$3, funcType$4, funcType$5, funcType$6, funcType$7, funcType$8, funcType$9, funcType$10, ptrType$6, funcType$11, ptrType$7, ptrType$8, ptrType$9, mapType, mapType$1, funcType$12, funcType$13, mapType$2, NewInputFrameDownsync, NewRingBufferJs, NewCollisionSpaceJs, NewVec2DJs, NewPolygon2DJs, NewBarrierJs, NewPlayerDownsyncJs, NewMeleeBulletJs, NewRoomDownsyncFrameJs, GetCollisionSpaceObjsJs, GenerateRectColliderJs, GenerateConvexPolygonColliderJs, ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs, main;
|
||||||
js = $packages["github.com/gopherjs/gopherjs/js"];
|
js = $packages["github.com/gopherjs/gopherjs/js"];
|
||||||
battle = $packages["jsexport/battle"];
|
battle = $packages["jsexport/battle"];
|
||||||
resolv = $packages["resolv"];
|
resolv = $packages["resolv"];
|
||||||
@ -5902,21 +5905,22 @@ $packages["jsexport"] = (function() {
|
|||||||
funcType$1 = $funcType([ptrType, sliceType$1], [ptrType$5], false);
|
funcType$1 = $funcType([ptrType, sliceType$1], [ptrType$5], false);
|
||||||
funcType$2 = $funcType([ptrType$1], [ptrType$5], false);
|
funcType$2 = $funcType([ptrType$1], [ptrType$5], false);
|
||||||
funcType$3 = $funcType([$Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Bool, $Float64], [ptrType$5], false);
|
funcType$3 = $funcType([$Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Bool, $Float64], [ptrType$5], false);
|
||||||
funcType$4 = $funcType([$Int32, sliceType$2, sliceType$3], [ptrType$5], false);
|
funcType$4 = $funcType([$Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64], [ptrType$5], false);
|
||||||
funcType$5 = $funcType([$Int, $Int, $Int, $Int], [ptrType$5], false);
|
funcType$5 = $funcType([$Int32, sliceType$2, sliceType$3], [ptrType$5], false);
|
||||||
funcType$6 = $funcType([$Int32, sliceType, $Uint64], [ptrType$5], false);
|
funcType$6 = $funcType([$Int, $Int, $Int, $Int], [ptrType$5], false);
|
||||||
funcType$7 = $funcType([$Int32], [ptrType$5], false);
|
funcType$7 = $funcType([$Int32, sliceType, $Uint64], [ptrType$5], false);
|
||||||
funcType$8 = $funcType([$Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $emptyInterface, $String], [ptrType$5], false);
|
funcType$8 = $funcType([$Int32], [ptrType$5], false);
|
||||||
funcType$9 = $funcType([ptrType$1, $Float64, $Float64, $emptyInterface, $String], [ptrType$5], false);
|
funcType$9 = $funcType([$Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $emptyInterface, $String], [ptrType$5], false);
|
||||||
|
funcType$10 = $funcType([ptrType$1, $Float64, $Float64, $emptyInterface, $String], [ptrType$5], false);
|
||||||
ptrType$6 = $ptrType(resolv.Space);
|
ptrType$6 = $ptrType(resolv.Space);
|
||||||
funcType$10 = $funcType([ptrType$6], [sliceType$5], false);
|
funcType$11 = $funcType([ptrType$6], [sliceType$5], false);
|
||||||
ptrType$7 = $ptrType(battle.RingBuffer);
|
ptrType$7 = $ptrType(battle.RingBuffer);
|
||||||
ptrType$8 = $ptrType(battle.RoomDownsyncFrame);
|
ptrType$8 = $ptrType(battle.RoomDownsyncFrame);
|
||||||
ptrType$9 = $ptrType(resolv.Object);
|
ptrType$9 = $ptrType(resolv.Object);
|
||||||
mapType = $mapType($Int32, ptrType$9);
|
mapType = $mapType($Int32, ptrType$9);
|
||||||
mapType$1 = $mapType($Int, $Int);
|
mapType$1 = $mapType($Int, $Int);
|
||||||
funcType$11 = $funcType([ptrType$7, ptrType$8, ptrType$6, mapType, $Int32, $Int32, $Int32, $Int32, $Uint32, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, mapType$1], [ptrType$5], false);
|
funcType$12 = $funcType([ptrType$7, ptrType$8, ptrType$6, mapType, $Int32, $Int32, $Int32, $Int32, $Uint32, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, mapType$1], [ptrType$5], false);
|
||||||
funcType$12 = $funcType([$Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64], [$Float64, $Float64], false);
|
funcType$13 = $funcType([$Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64], [$Float64, $Float64], false);
|
||||||
mapType$2 = $mapType($String, $emptyInterface);
|
mapType$2 = $mapType($String, $emptyInterface);
|
||||||
NewInputFrameDownsync = function(inputFrameId, inputList, confirmedList) {
|
NewInputFrameDownsync = function(inputFrameId, inputList, confirmedList) {
|
||||||
var {$24r, _r, confirmedList, inputFrameId, inputList, $s, $r, $c} = $restore(this, {inputFrameId, inputList, confirmedList});
|
var {$24r, _r, confirmedList, inputFrameId, inputList, $s, $r, $c} = $restore(this, {inputFrameId, inputList, confirmedList});
|
||||||
@ -5969,10 +5973,15 @@ $packages["jsexport"] = (function() {
|
|||||||
return js.MakeWrapper(new battle.PlayerDownsync.ptr(id, virtualGridX, virtualGridY, dirX, dirY, velX, velY, speed, battleState, joinIndex, colliderRadius, false, 0, 0, 0, hp, maxHp, characterState, inAir));
|
return js.MakeWrapper(new battle.PlayerDownsync.ptr(id, virtualGridX, virtualGridY, dirX, dirY, velX, velY, speed, battleState, joinIndex, colliderRadius, false, 0, 0, 0, hp, maxHp, characterState, inAir));
|
||||||
};
|
};
|
||||||
$pkg.NewPlayerDownsyncJs = NewPlayerDownsyncJs;
|
$pkg.NewPlayerDownsyncJs = NewPlayerDownsyncJs;
|
||||||
|
NewMeleeBulletJs = function(battleLocalId, startupFrames, activeFrames, recoveryFrames, recoveryFramesOnBlock, recoveryFramesOnHit, hitStunFrames, blockStunFrames, releaseTriggerType, damage, offenderJoinIndex, offenderPlayerId, pushback, hitboxOffset, selfMoveforwardX, selfMoveforwardY, hitboxSizeX, hitboxSizeY) {
|
||||||
|
var activeFrames, battleLocalId, blockStunFrames, damage, hitStunFrames, hitboxOffset, hitboxSizeX, hitboxSizeY, offenderJoinIndex, offenderPlayerId, pushback, recoveryFrames, recoveryFramesOnBlock, recoveryFramesOnHit, releaseTriggerType, selfMoveforwardX, selfMoveforwardY, startupFrames;
|
||||||
|
return js.MakeWrapper(new battle.MeleeBullet.ptr(new battle.Bullet.ptr(battleLocalId, startupFrames, activeFrames, recoveryFrames, recoveryFramesOnBlock, recoveryFramesOnHit, hitboxOffset, 0, hitStunFrames, blockStunFrames, pushback, releaseTriggerType, damage, offenderJoinIndex, offenderPlayerId, selfMoveforwardX, selfMoveforwardY, hitboxSizeX, hitboxSizeY)));
|
||||||
|
};
|
||||||
|
$pkg.NewMeleeBulletJs = NewMeleeBulletJs;
|
||||||
NewRoomDownsyncFrameJs = function(id, playersArr, meleeBullets) {
|
NewRoomDownsyncFrameJs = function(id, playersArr, meleeBullets) {
|
||||||
var {$24r, _r, id, meleeBullets, playersArr, $s, $r, $c} = $restore(this, {id, playersArr, meleeBullets});
|
var {$24r, _r, id, meleeBullets, playersArr, $s, $r, $c} = $restore(this, {id, playersArr, meleeBullets});
|
||||||
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
||||||
_r = js.MakeFullWrapper(new battle.RoomDownsyncFrame.ptr(id, playersArr, new $Int64(0, 0), meleeBullets, sliceType$4.nil, new $Uint64(0, 0), false)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
_r = js.MakeFullWrapper(new battle.RoomDownsyncFrame.ptr(id, playersArr, new $Int64(0, 0), meleeBullets, sliceType$4.nil, new $Uint64(0, 0), false, false)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
||||||
$24r = _r;
|
$24r = _r;
|
||||||
$s = 2; case 2: return $24r;
|
$s = 2; case 2: return $24r;
|
||||||
/* */ } return; } var $f = {$blk: NewRoomDownsyncFrameJs, $c: true, $r, $24r, _r, id, meleeBullets, playersArr, $s};return $f;
|
/* */ } return; } var $f = {$blk: NewRoomDownsyncFrameJs, $c: true, $r, $24r, _r, id, meleeBullets, playersArr, $s};return $f;
|
||||||
@ -6028,7 +6037,7 @@ $packages["jsexport"] = (function() {
|
|||||||
};
|
};
|
||||||
$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs = ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs;
|
$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs = ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs;
|
||||||
main = function() {
|
main = function() {
|
||||||
$global.gopkgs = $externalize($makeMap($String.keyFor, [{ k: "NewVec2DJs", v: new funcType(NewVec2DJs) }, { k: "NewPolygon2DJs", v: new funcType$1(NewPolygon2DJs) }, { k: "NewBarrierJs", v: new funcType$2(NewBarrierJs) }, { k: "NewPlayerDownsyncJs", v: new funcType$3(NewPlayerDownsyncJs) }, { k: "NewRoomDownsyncFrameJs", v: new funcType$4(NewRoomDownsyncFrameJs) }, { k: "NewCollisionSpaceJs", v: new funcType$5(NewCollisionSpaceJs) }, { k: "NewInputFrameDownsync", v: new funcType$6(NewInputFrameDownsync) }, { k: "NewRingBufferJs", v: new funcType$7(NewRingBufferJs) }, { k: "GenerateRectColliderJs", v: new funcType$8(GenerateRectColliderJs) }, { k: "GenerateConvexPolygonColliderJs", v: new funcType$9(GenerateConvexPolygonColliderJs) }, { k: "GetCollisionSpaceObjsJs", v: new funcType$10(GetCollisionSpaceObjsJs) }, { k: "ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs", v: new funcType$11(ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs) }, { k: "WorldToPolygonColliderBLPos", v: new funcType$12(battle.WorldToPolygonColliderBLPos) }, { k: "PolygonColliderBLToWorldPos", v: new funcType$12(battle.PolygonColliderBLToWorldPos) }]), mapType$2);
|
$global.gopkgs = $externalize($makeMap($String.keyFor, [{ k: "NewVec2DJs", v: new funcType(NewVec2DJs) }, { k: "NewPolygon2DJs", v: new funcType$1(NewPolygon2DJs) }, { k: "NewBarrierJs", v: new funcType$2(NewBarrierJs) }, { k: "NewPlayerDownsyncJs", v: new funcType$3(NewPlayerDownsyncJs) }, { k: "NewMeleeBulletJs", v: new funcType$4(NewMeleeBulletJs) }, { k: "NewRoomDownsyncFrameJs", v: new funcType$5(NewRoomDownsyncFrameJs) }, { k: "NewCollisionSpaceJs", v: new funcType$6(NewCollisionSpaceJs) }, { k: "NewInputFrameDownsync", v: new funcType$7(NewInputFrameDownsync) }, { k: "NewRingBufferJs", v: new funcType$8(NewRingBufferJs) }, { k: "GenerateRectColliderJs", v: new funcType$9(GenerateRectColliderJs) }, { k: "GenerateConvexPolygonColliderJs", v: new funcType$10(GenerateConvexPolygonColliderJs) }, { k: "GetCollisionSpaceObjsJs", v: new funcType$11(GetCollisionSpaceObjsJs) }, { k: "ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs", v: new funcType$12(ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs) }, { k: "WorldToPolygonColliderBLPos", v: new funcType$13(battle.WorldToPolygonColliderBLPos) }, { k: "PolygonColliderBLToWorldPos", v: new funcType$13(battle.PolygonColliderBLToWorldPos) }]), mapType$2);
|
||||||
};
|
};
|
||||||
$init = function() {
|
$init = function() {
|
||||||
$pkg.$init = function() {};
|
$pkg.$init = function() {};
|
||||||
|
@ -156,4 +156,5 @@ message RoomDownsyncFrame {
|
|||||||
repeated MeleeBullet meleeBullets = 4; // I don't know how to mimic inheritance/composition in protobuf by far, thus using an array for each type of bullet as a compromise
|
repeated MeleeBullet meleeBullets = 4; // I don't know how to mimic inheritance/composition in protobuf by far, thus using an array for each type of bullet as a compromise
|
||||||
uint64 backendUnconfirmedMask = 5; // Indexed by "joinIndex", same compression concern as stated in InputFrameDownsync
|
uint64 backendUnconfirmedMask = 5; // Indexed by "joinIndex", same compression concern as stated in InputFrameDownsync
|
||||||
bool shouldForceResync = 6;
|
bool shouldForceResync = 6;
|
||||||
|
map<int32, int32> playerOpPatternToSkillId = 7;
|
||||||
}
|
}
|
||||||
|
@ -440,7 +440,7 @@
|
|||||||
"array": [
|
"array": [
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
210.2224973754617,
|
216.50635094610968,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -403,7 +403,6 @@ cc.Class({
|
|||||||
console.log(`Received parsedBattleColliderInfo via ws`);
|
console.log(`Received parsedBattleColliderInfo via ws`);
|
||||||
// TODO: Upon reconnection, the backend might have already been sending down data that'd trigger "onRoomDownsyncFrame & onInputFrameDownsyncBatch", but frontend could reject those data due to "battleState != PlayerBattleState.ACTIVE".
|
// TODO: Upon reconnection, the backend might have already been sending down data that'd trigger "onRoomDownsyncFrame & onInputFrameDownsyncBatch", but frontend could reject those data due to "battleState != PlayerBattleState.ACTIVE".
|
||||||
Object.assign(self, parsedBattleColliderInfo);
|
Object.assign(self, parsedBattleColliderInfo);
|
||||||
self.gravityX = parsedBattleColliderInfo.gravityX; // to avoid integer default value 0 accidentally becoming null in "Object.assign(...)"
|
|
||||||
self.tooFastDtIntervalMillis = 0.5 * self.rollbackEstimatedDtMillis;
|
self.tooFastDtIntervalMillis = 0.5 * self.rollbackEstimatedDtMillis;
|
||||||
|
|
||||||
const tiledMapIns = self.node.getComponent(cc.TiledMap);
|
const tiledMapIns = self.node.getComponent(cc.TiledMap);
|
||||||
@ -504,7 +503,7 @@ cc.Class({
|
|||||||
}
|
}
|
||||||
self.selfPlayerInfo = JSON.parse(cc.sys.localStorage.getItem('selfPlayer'));
|
self.selfPlayerInfo = JSON.parse(cc.sys.localStorage.getItem('selfPlayer'));
|
||||||
Object.assign(self.selfPlayerInfo, {
|
Object.assign(self.selfPlayerInfo, {
|
||||||
id: self.selfPlayerInfo.playerId
|
Id: self.selfPlayerInfo.playerId
|
||||||
});
|
});
|
||||||
|
|
||||||
const reqData = window.pb.protos.WsReq.encode({
|
const reqData = window.pb.protos.WsReq.encode({
|
||||||
@ -627,6 +626,7 @@ cc.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The logic below applies to (window.MAGIC_ROOM_DOWNSYNC_FRAME_ID.BATTLE_START == rdf.id || window.RING_BUFF_NON_CONSECUTIVE_SET == dumpRenderCacheRet)
|
// The logic below applies to (window.MAGIC_ROOM_DOWNSYNC_FRAME_ID.BATTLE_START == rdf.id || window.RING_BUFF_NON_CONSECUTIVE_SET == dumpRenderCacheRet)
|
||||||
|
self.playerOpPatternToSkillId = pbRdf.playerOpPatternToSkillId;
|
||||||
self._initPlayerRichInfoDict(rdf.PlayersArr);
|
self._initPlayerRichInfoDict(rdf.PlayersArr);
|
||||||
|
|
||||||
// Show the top status indicators for IN_BATTLE
|
// Show the top status indicators for IN_BATTLE
|
||||||
@ -744,14 +744,14 @@ cc.Class({
|
|||||||
&&
|
&&
|
||||||
null == firstPredictedYetIncorrectInputFrameId
|
null == firstPredictedYetIncorrectInputFrameId
|
||||||
&&
|
&&
|
||||||
!self.equalInputLists(localInputFrame.inputList, inputFrameDownsync.inputList)
|
!self.equalInputLists(localInputFrame.InputList, inputFrameDownsync.inputList)
|
||||||
) {
|
) {
|
||||||
firstPredictedYetIncorrectInputFrameId = inputFrameDownsyncId;
|
firstPredictedYetIncorrectInputFrameId = inputFrameDownsyncId;
|
||||||
}
|
}
|
||||||
inputFrameDownsync.confirmedList = (1 << self.playerRichInfoDict.size) - 1;
|
inputFrameDownsync.confirmedList = (1 << self.playerRichInfoDict.size) - 1;
|
||||||
inputFrameDownsyncLocal = gopkgs.NewInputFrameDownsync(inputFrameDownsync.inputFrameId, inputFrameDownsync.inputList, inputFrameDownsync.confirmedList); // "battle.InputFrameDownsync" in "jsexport"
|
const inputFrameDownsyncLocal = gopkgs.NewInputFrameDownsync(inputFrameDownsync.inputFrameId, inputFrameDownsync.inputList, inputFrameDownsync.confirmedList); // "battle.InputFrameDownsync" in "jsexport"
|
||||||
//console.log(`Confirmed inputFrameId=${inputFrameDownsync.inputFrameId}`);
|
//console.log(`Confirmed inputFrameId=${inputFrameDownsync.inputFrameId}`);
|
||||||
const [ret, oldStFrameId, oldEdFrameId] = self.recentInputCache.SetByFrameId(inputFrameDownsync, inputFrameDownsync.inputFrameId);
|
const [ret, oldStFrameId, oldEdFrameId] = self.recentInputCache.SetByFrameId(inputFrameDownsyncLocal, inputFrameDownsync.inputFrameId);
|
||||||
if (window.RING_BUFF_FAILED_TO_SET == ret) {
|
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)}`;
|
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)}`;
|
||||||
}
|
}
|
||||||
|
@ -4601,7 +4601,6 @@ $root.protos = (function() {
|
|||||||
* @property {number|null} [virtualGridToWorldRatio] BattleColliderInfo virtualGridToWorldRatio
|
* @property {number|null} [virtualGridToWorldRatio] BattleColliderInfo virtualGridToWorldRatio
|
||||||
* @property {number|null} [spAtkLookupFrames] BattleColliderInfo spAtkLookupFrames
|
* @property {number|null} [spAtkLookupFrames] BattleColliderInfo spAtkLookupFrames
|
||||||
* @property {number|null} [renderCacheSize] BattleColliderInfo renderCacheSize
|
* @property {number|null} [renderCacheSize] BattleColliderInfo renderCacheSize
|
||||||
* @property {Object.<string,protos.MeleeBullet>|null} [meleeSkillConfig] BattleColliderInfo meleeSkillConfig
|
|
||||||
* @property {number|null} [snapIntoPlatformOverlap] BattleColliderInfo snapIntoPlatformOverlap
|
* @property {number|null} [snapIntoPlatformOverlap] BattleColliderInfo snapIntoPlatformOverlap
|
||||||
* @property {number|null} [snapIntoPlatformThreshold] BattleColliderInfo snapIntoPlatformThreshold
|
* @property {number|null} [snapIntoPlatformThreshold] BattleColliderInfo snapIntoPlatformThreshold
|
||||||
* @property {number|null} [jumpingInitVelY] BattleColliderInfo jumpingInitVelY
|
* @property {number|null} [jumpingInitVelY] BattleColliderInfo jumpingInitVelY
|
||||||
@ -4620,7 +4619,6 @@ $root.protos = (function() {
|
|||||||
* @param {protos.IBattleColliderInfo=} [properties] Properties to set
|
* @param {protos.IBattleColliderInfo=} [properties] Properties to set
|
||||||
*/
|
*/
|
||||||
function BattleColliderInfo(properties) {
|
function BattleColliderInfo(properties) {
|
||||||
this.meleeSkillConfig = {};
|
|
||||||
if (properties)
|
if (properties)
|
||||||
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
||||||
if (properties[keys[i]] != null)
|
if (properties[keys[i]] != null)
|
||||||
@ -4811,14 +4809,6 @@ $root.protos = (function() {
|
|||||||
*/
|
*/
|
||||||
BattleColliderInfo.prototype.renderCacheSize = 0;
|
BattleColliderInfo.prototype.renderCacheSize = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* BattleColliderInfo meleeSkillConfig.
|
|
||||||
* @member {Object.<string,protos.MeleeBullet>} meleeSkillConfig
|
|
||||||
* @memberof protos.BattleColliderInfo
|
|
||||||
* @instance
|
|
||||||
*/
|
|
||||||
BattleColliderInfo.prototype.meleeSkillConfig = $util.emptyObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BattleColliderInfo snapIntoPlatformOverlap.
|
* BattleColliderInfo snapIntoPlatformOverlap.
|
||||||
* @member {number} snapIntoPlatformOverlap
|
* @member {number} snapIntoPlatformOverlap
|
||||||
@ -4945,23 +4935,18 @@ $root.protos = (function() {
|
|||||||
writer.uint32(/* id 22, wireType 0 =*/176).int32(message.spAtkLookupFrames);
|
writer.uint32(/* id 22, wireType 0 =*/176).int32(message.spAtkLookupFrames);
|
||||||
if (message.renderCacheSize != null && Object.hasOwnProperty.call(message, "renderCacheSize"))
|
if (message.renderCacheSize != null && Object.hasOwnProperty.call(message, "renderCacheSize"))
|
||||||
writer.uint32(/* id 23, wireType 0 =*/184).int32(message.renderCacheSize);
|
writer.uint32(/* id 23, wireType 0 =*/184).int32(message.renderCacheSize);
|
||||||
if (message.meleeSkillConfig != null && Object.hasOwnProperty.call(message, "meleeSkillConfig"))
|
|
||||||
for (var keys = Object.keys(message.meleeSkillConfig), i = 0; i < keys.length; ++i) {
|
|
||||||
writer.uint32(/* id 24, wireType 2 =*/194).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]);
|
|
||||||
$root.protos.MeleeBullet.encode(message.meleeSkillConfig[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
|
||||||
}
|
|
||||||
if (message.snapIntoPlatformOverlap != null && Object.hasOwnProperty.call(message, "snapIntoPlatformOverlap"))
|
if (message.snapIntoPlatformOverlap != null && Object.hasOwnProperty.call(message, "snapIntoPlatformOverlap"))
|
||||||
writer.uint32(/* id 25, wireType 1 =*/201).double(message.snapIntoPlatformOverlap);
|
writer.uint32(/* id 24, wireType 1 =*/193).double(message.snapIntoPlatformOverlap);
|
||||||
if (message.snapIntoPlatformThreshold != null && Object.hasOwnProperty.call(message, "snapIntoPlatformThreshold"))
|
if (message.snapIntoPlatformThreshold != null && Object.hasOwnProperty.call(message, "snapIntoPlatformThreshold"))
|
||||||
writer.uint32(/* id 26, wireType 1 =*/209).double(message.snapIntoPlatformThreshold);
|
writer.uint32(/* id 25, wireType 1 =*/201).double(message.snapIntoPlatformThreshold);
|
||||||
if (message.jumpingInitVelY != null && Object.hasOwnProperty.call(message, "jumpingInitVelY"))
|
if (message.jumpingInitVelY != null && Object.hasOwnProperty.call(message, "jumpingInitVelY"))
|
||||||
writer.uint32(/* id 27, wireType 0 =*/216).int32(message.jumpingInitVelY);
|
writer.uint32(/* id 26, wireType 0 =*/208).int32(message.jumpingInitVelY);
|
||||||
if (message.gravityX != null && Object.hasOwnProperty.call(message, "gravityX"))
|
if (message.gravityX != null && Object.hasOwnProperty.call(message, "gravityX"))
|
||||||
writer.uint32(/* id 28, wireType 0 =*/224).int32(message.gravityX);
|
writer.uint32(/* id 27, wireType 0 =*/216).int32(message.gravityX);
|
||||||
if (message.gravityY != null && Object.hasOwnProperty.call(message, "gravityY"))
|
if (message.gravityY != null && Object.hasOwnProperty.call(message, "gravityY"))
|
||||||
writer.uint32(/* id 29, wireType 0 =*/232).int32(message.gravityY);
|
writer.uint32(/* id 28, wireType 0 =*/224).int32(message.gravityY);
|
||||||
if (message.collisionMinStep != null && Object.hasOwnProperty.call(message, "collisionMinStep"))
|
if (message.collisionMinStep != null && Object.hasOwnProperty.call(message, "collisionMinStep"))
|
||||||
writer.uint32(/* id 30, wireType 0 =*/240).int32(message.collisionMinStep);
|
writer.uint32(/* id 29, wireType 0 =*/232).int32(message.collisionMinStep);
|
||||||
if (message.frameDataLoggingEnabled != null && Object.hasOwnProperty.call(message, "frameDataLoggingEnabled"))
|
if (message.frameDataLoggingEnabled != null && Object.hasOwnProperty.call(message, "frameDataLoggingEnabled"))
|
||||||
writer.uint32(/* id 999, wireType 0 =*/7992).bool(message.frameDataLoggingEnabled);
|
writer.uint32(/* id 999, wireType 0 =*/7992).bool(message.frameDataLoggingEnabled);
|
||||||
return writer;
|
return writer;
|
||||||
@ -4994,7 +4979,7 @@ $root.protos = (function() {
|
|||||||
BattleColliderInfo.decode = function decode(reader, length) {
|
BattleColliderInfo.decode = function decode(reader, length) {
|
||||||
if (!(reader instanceof $Reader))
|
if (!(reader instanceof $Reader))
|
||||||
reader = $Reader.create(reader);
|
reader = $Reader.create(reader);
|
||||||
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protos.BattleColliderInfo(), key, value;
|
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protos.BattleColliderInfo();
|
||||||
while (reader.pos < end) {
|
while (reader.pos < end) {
|
||||||
var tag = reader.uint32();
|
var tag = reader.uint32();
|
||||||
switch (tag >>> 3) {
|
switch (tag >>> 3) {
|
||||||
@ -5091,49 +5076,26 @@ $root.protos = (function() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 24: {
|
case 24: {
|
||||||
if (message.meleeSkillConfig === $util.emptyObject)
|
|
||||||
message.meleeSkillConfig = {};
|
|
||||||
var end2 = reader.uint32() + reader.pos;
|
|
||||||
key = 0;
|
|
||||||
value = null;
|
|
||||||
while (reader.pos < end2) {
|
|
||||||
var tag2 = reader.uint32();
|
|
||||||
switch (tag2 >>> 3) {
|
|
||||||
case 1:
|
|
||||||
key = reader.int32();
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
value = $root.protos.MeleeBullet.decode(reader, reader.uint32());
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
reader.skipType(tag2 & 7);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
message.meleeSkillConfig[key] = value;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 25: {
|
|
||||||
message.snapIntoPlatformOverlap = reader.double();
|
message.snapIntoPlatformOverlap = reader.double();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 26: {
|
case 25: {
|
||||||
message.snapIntoPlatformThreshold = reader.double();
|
message.snapIntoPlatformThreshold = reader.double();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 27: {
|
case 26: {
|
||||||
message.jumpingInitVelY = reader.int32();
|
message.jumpingInitVelY = reader.int32();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 28: {
|
case 27: {
|
||||||
message.gravityX = reader.int32();
|
message.gravityX = reader.int32();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 29: {
|
case 28: {
|
||||||
message.gravityY = reader.int32();
|
message.gravityY = reader.int32();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 30: {
|
case 29: {
|
||||||
message.collisionMinStep = reader.int32();
|
message.collisionMinStep = reader.int32();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -5245,20 +5207,6 @@ $root.protos = (function() {
|
|||||||
if (message.renderCacheSize != null && message.hasOwnProperty("renderCacheSize"))
|
if (message.renderCacheSize != null && message.hasOwnProperty("renderCacheSize"))
|
||||||
if (!$util.isInteger(message.renderCacheSize))
|
if (!$util.isInteger(message.renderCacheSize))
|
||||||
return "renderCacheSize: integer expected";
|
return "renderCacheSize: integer expected";
|
||||||
if (message.meleeSkillConfig != null && message.hasOwnProperty("meleeSkillConfig")) {
|
|
||||||
if (!$util.isObject(message.meleeSkillConfig))
|
|
||||||
return "meleeSkillConfig: object expected";
|
|
||||||
var key = Object.keys(message.meleeSkillConfig);
|
|
||||||
for (var i = 0; i < key.length; ++i) {
|
|
||||||
if (!$util.key32Re.test(key[i]))
|
|
||||||
return "meleeSkillConfig: integer key{k:int32} expected";
|
|
||||||
{
|
|
||||||
var error = $root.protos.MeleeBullet.verify(message.meleeSkillConfig[key[i]]);
|
|
||||||
if (error)
|
|
||||||
return "meleeSkillConfig." + error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (message.snapIntoPlatformOverlap != null && message.hasOwnProperty("snapIntoPlatformOverlap"))
|
if (message.snapIntoPlatformOverlap != null && message.hasOwnProperty("snapIntoPlatformOverlap"))
|
||||||
if (typeof message.snapIntoPlatformOverlap !== "number")
|
if (typeof message.snapIntoPlatformOverlap !== "number")
|
||||||
return "snapIntoPlatformOverlap: number expected";
|
return "snapIntoPlatformOverlap: number expected";
|
||||||
@ -5355,16 +5303,6 @@ $root.protos = (function() {
|
|||||||
message.spAtkLookupFrames = object.spAtkLookupFrames | 0;
|
message.spAtkLookupFrames = object.spAtkLookupFrames | 0;
|
||||||
if (object.renderCacheSize != null)
|
if (object.renderCacheSize != null)
|
||||||
message.renderCacheSize = object.renderCacheSize | 0;
|
message.renderCacheSize = object.renderCacheSize | 0;
|
||||||
if (object.meleeSkillConfig) {
|
|
||||||
if (typeof object.meleeSkillConfig !== "object")
|
|
||||||
throw TypeError(".protos.BattleColliderInfo.meleeSkillConfig: object expected");
|
|
||||||
message.meleeSkillConfig = {};
|
|
||||||
for (var keys = Object.keys(object.meleeSkillConfig), i = 0; i < keys.length; ++i) {
|
|
||||||
if (typeof object.meleeSkillConfig[keys[i]] !== "object")
|
|
||||||
throw TypeError(".protos.BattleColliderInfo.meleeSkillConfig: object expected");
|
|
||||||
message.meleeSkillConfig[keys[i]] = $root.protos.MeleeBullet.fromObject(object.meleeSkillConfig[keys[i]]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (object.snapIntoPlatformOverlap != null)
|
if (object.snapIntoPlatformOverlap != null)
|
||||||
message.snapIntoPlatformOverlap = Number(object.snapIntoPlatformOverlap);
|
message.snapIntoPlatformOverlap = Number(object.snapIntoPlatformOverlap);
|
||||||
if (object.snapIntoPlatformThreshold != null)
|
if (object.snapIntoPlatformThreshold != null)
|
||||||
@ -5395,8 +5333,6 @@ $root.protos = (function() {
|
|||||||
if (!options)
|
if (!options)
|
||||||
options = {};
|
options = {};
|
||||||
var object = {};
|
var object = {};
|
||||||
if (options.objects || options.defaults)
|
|
||||||
object.meleeSkillConfig = {};
|
|
||||||
if (options.defaults) {
|
if (options.defaults) {
|
||||||
object.stageName = "";
|
object.stageName = "";
|
||||||
object.stageDiscreteW = 0;
|
object.stageDiscreteW = 0;
|
||||||
@ -5489,12 +5425,6 @@ $root.protos = (function() {
|
|||||||
object.spAtkLookupFrames = message.spAtkLookupFrames;
|
object.spAtkLookupFrames = message.spAtkLookupFrames;
|
||||||
if (message.renderCacheSize != null && message.hasOwnProperty("renderCacheSize"))
|
if (message.renderCacheSize != null && message.hasOwnProperty("renderCacheSize"))
|
||||||
object.renderCacheSize = message.renderCacheSize;
|
object.renderCacheSize = message.renderCacheSize;
|
||||||
var keys2;
|
|
||||||
if (message.meleeSkillConfig && (keys2 = Object.keys(message.meleeSkillConfig)).length) {
|
|
||||||
object.meleeSkillConfig = {};
|
|
||||||
for (var j = 0; j < keys2.length; ++j)
|
|
||||||
object.meleeSkillConfig[keys2[j]] = $root.protos.MeleeBullet.toObject(message.meleeSkillConfig[keys2[j]], options);
|
|
||||||
}
|
|
||||||
if (message.snapIntoPlatformOverlap != null && message.hasOwnProperty("snapIntoPlatformOverlap"))
|
if (message.snapIntoPlatformOverlap != null && message.hasOwnProperty("snapIntoPlatformOverlap"))
|
||||||
object.snapIntoPlatformOverlap = options.json && !isFinite(message.snapIntoPlatformOverlap) ? String(message.snapIntoPlatformOverlap) : message.snapIntoPlatformOverlap;
|
object.snapIntoPlatformOverlap = options.json && !isFinite(message.snapIntoPlatformOverlap) ? String(message.snapIntoPlatformOverlap) : message.snapIntoPlatformOverlap;
|
||||||
if (message.snapIntoPlatformThreshold != null && message.hasOwnProperty("snapIntoPlatformThreshold"))
|
if (message.snapIntoPlatformThreshold != null && message.hasOwnProperty("snapIntoPlatformThreshold"))
|
||||||
@ -5553,6 +5483,7 @@ $root.protos = (function() {
|
|||||||
* @property {Array.<protos.MeleeBullet>|null} [meleeBullets] RoomDownsyncFrame meleeBullets
|
* @property {Array.<protos.MeleeBullet>|null} [meleeBullets] RoomDownsyncFrame meleeBullets
|
||||||
* @property {number|Long|null} [backendUnconfirmedMask] RoomDownsyncFrame backendUnconfirmedMask
|
* @property {number|Long|null} [backendUnconfirmedMask] RoomDownsyncFrame backendUnconfirmedMask
|
||||||
* @property {boolean|null} [shouldForceResync] RoomDownsyncFrame shouldForceResync
|
* @property {boolean|null} [shouldForceResync] RoomDownsyncFrame shouldForceResync
|
||||||
|
* @property {Object.<string,number>|null} [playerOpPatternToSkillId] RoomDownsyncFrame playerOpPatternToSkillId
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -5566,6 +5497,7 @@ $root.protos = (function() {
|
|||||||
function RoomDownsyncFrame(properties) {
|
function RoomDownsyncFrame(properties) {
|
||||||
this.playersArr = [];
|
this.playersArr = [];
|
||||||
this.meleeBullets = [];
|
this.meleeBullets = [];
|
||||||
|
this.playerOpPatternToSkillId = {};
|
||||||
if (properties)
|
if (properties)
|
||||||
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
||||||
if (properties[keys[i]] != null)
|
if (properties[keys[i]] != null)
|
||||||
@ -5620,6 +5552,14 @@ $root.protos = (function() {
|
|||||||
*/
|
*/
|
||||||
RoomDownsyncFrame.prototype.shouldForceResync = false;
|
RoomDownsyncFrame.prototype.shouldForceResync = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RoomDownsyncFrame playerOpPatternToSkillId.
|
||||||
|
* @member {Object.<string,number>} playerOpPatternToSkillId
|
||||||
|
* @memberof protos.RoomDownsyncFrame
|
||||||
|
* @instance
|
||||||
|
*/
|
||||||
|
RoomDownsyncFrame.prototype.playerOpPatternToSkillId = $util.emptyObject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new RoomDownsyncFrame instance using the specified properties.
|
* Creates a new RoomDownsyncFrame instance using the specified properties.
|
||||||
* @function create
|
* @function create
|
||||||
@ -5658,6 +5598,9 @@ $root.protos = (function() {
|
|||||||
writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.backendUnconfirmedMask);
|
writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.backendUnconfirmedMask);
|
||||||
if (message.shouldForceResync != null && Object.hasOwnProperty.call(message, "shouldForceResync"))
|
if (message.shouldForceResync != null && Object.hasOwnProperty.call(message, "shouldForceResync"))
|
||||||
writer.uint32(/* id 6, wireType 0 =*/48).bool(message.shouldForceResync);
|
writer.uint32(/* id 6, wireType 0 =*/48).bool(message.shouldForceResync);
|
||||||
|
if (message.playerOpPatternToSkillId != null && Object.hasOwnProperty.call(message, "playerOpPatternToSkillId"))
|
||||||
|
for (var keys = Object.keys(message.playerOpPatternToSkillId), i = 0; i < keys.length; ++i)
|
||||||
|
writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.playerOpPatternToSkillId[keys[i]]).ldelim();
|
||||||
return writer;
|
return writer;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -5688,7 +5631,7 @@ $root.protos = (function() {
|
|||||||
RoomDownsyncFrame.decode = function decode(reader, length) {
|
RoomDownsyncFrame.decode = function decode(reader, length) {
|
||||||
if (!(reader instanceof $Reader))
|
if (!(reader instanceof $Reader))
|
||||||
reader = $Reader.create(reader);
|
reader = $Reader.create(reader);
|
||||||
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protos.RoomDownsyncFrame();
|
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protos.RoomDownsyncFrame(), key, value;
|
||||||
while (reader.pos < end) {
|
while (reader.pos < end) {
|
||||||
var tag = reader.uint32();
|
var tag = reader.uint32();
|
||||||
switch (tag >>> 3) {
|
switch (tag >>> 3) {
|
||||||
@ -5720,6 +5663,29 @@ $root.protos = (function() {
|
|||||||
message.shouldForceResync = reader.bool();
|
message.shouldForceResync = reader.bool();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 7: {
|
||||||
|
if (message.playerOpPatternToSkillId === $util.emptyObject)
|
||||||
|
message.playerOpPatternToSkillId = {};
|
||||||
|
var end2 = reader.uint32() + reader.pos;
|
||||||
|
key = 0;
|
||||||
|
value = 0;
|
||||||
|
while (reader.pos < end2) {
|
||||||
|
var tag2 = reader.uint32();
|
||||||
|
switch (tag2 >>> 3) {
|
||||||
|
case 1:
|
||||||
|
key = reader.int32();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
value = reader.int32();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reader.skipType(tag2 & 7);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
message.playerOpPatternToSkillId[key] = value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
reader.skipType(tag & 7);
|
reader.skipType(tag & 7);
|
||||||
break;
|
break;
|
||||||
@ -5785,6 +5751,17 @@ $root.protos = (function() {
|
|||||||
if (message.shouldForceResync != null && message.hasOwnProperty("shouldForceResync"))
|
if (message.shouldForceResync != null && message.hasOwnProperty("shouldForceResync"))
|
||||||
if (typeof message.shouldForceResync !== "boolean")
|
if (typeof message.shouldForceResync !== "boolean")
|
||||||
return "shouldForceResync: boolean expected";
|
return "shouldForceResync: boolean expected";
|
||||||
|
if (message.playerOpPatternToSkillId != null && message.hasOwnProperty("playerOpPatternToSkillId")) {
|
||||||
|
if (!$util.isObject(message.playerOpPatternToSkillId))
|
||||||
|
return "playerOpPatternToSkillId: object expected";
|
||||||
|
var key = Object.keys(message.playerOpPatternToSkillId);
|
||||||
|
for (var i = 0; i < key.length; ++i) {
|
||||||
|
if (!$util.key32Re.test(key[i]))
|
||||||
|
return "playerOpPatternToSkillId: integer key{k:int32} expected";
|
||||||
|
if (!$util.isInteger(message.playerOpPatternToSkillId[key[i]]))
|
||||||
|
return "playerOpPatternToSkillId: integer{k:int32} expected";
|
||||||
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -5842,6 +5819,13 @@ $root.protos = (function() {
|
|||||||
message.backendUnconfirmedMask = new $util.LongBits(object.backendUnconfirmedMask.low >>> 0, object.backendUnconfirmedMask.high >>> 0).toNumber(true);
|
message.backendUnconfirmedMask = new $util.LongBits(object.backendUnconfirmedMask.low >>> 0, object.backendUnconfirmedMask.high >>> 0).toNumber(true);
|
||||||
if (object.shouldForceResync != null)
|
if (object.shouldForceResync != null)
|
||||||
message.shouldForceResync = Boolean(object.shouldForceResync);
|
message.shouldForceResync = Boolean(object.shouldForceResync);
|
||||||
|
if (object.playerOpPatternToSkillId) {
|
||||||
|
if (typeof object.playerOpPatternToSkillId !== "object")
|
||||||
|
throw TypeError(".protos.RoomDownsyncFrame.playerOpPatternToSkillId: object expected");
|
||||||
|
message.playerOpPatternToSkillId = {};
|
||||||
|
for (var keys = Object.keys(object.playerOpPatternToSkillId), i = 0; i < keys.length; ++i)
|
||||||
|
message.playerOpPatternToSkillId[keys[i]] = object.playerOpPatternToSkillId[keys[i]] | 0;
|
||||||
|
}
|
||||||
return message;
|
return message;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -5862,6 +5846,8 @@ $root.protos = (function() {
|
|||||||
object.playersArr = [];
|
object.playersArr = [];
|
||||||
object.meleeBullets = [];
|
object.meleeBullets = [];
|
||||||
}
|
}
|
||||||
|
if (options.objects || options.defaults)
|
||||||
|
object.playerOpPatternToSkillId = {};
|
||||||
if (options.defaults) {
|
if (options.defaults) {
|
||||||
object.id = 0;
|
object.id = 0;
|
||||||
if ($util.Long) {
|
if ($util.Long) {
|
||||||
@ -5900,6 +5886,12 @@ $root.protos = (function() {
|
|||||||
object.backendUnconfirmedMask = options.longs === String ? $util.Long.prototype.toString.call(message.backendUnconfirmedMask) : options.longs === Number ? new $util.LongBits(message.backendUnconfirmedMask.low >>> 0, message.backendUnconfirmedMask.high >>> 0).toNumber(true) : message.backendUnconfirmedMask;
|
object.backendUnconfirmedMask = options.longs === String ? $util.Long.prototype.toString.call(message.backendUnconfirmedMask) : options.longs === Number ? new $util.LongBits(message.backendUnconfirmedMask.low >>> 0, message.backendUnconfirmedMask.high >>> 0).toNumber(true) : message.backendUnconfirmedMask;
|
||||||
if (message.shouldForceResync != null && message.hasOwnProperty("shouldForceResync"))
|
if (message.shouldForceResync != null && message.hasOwnProperty("shouldForceResync"))
|
||||||
object.shouldForceResync = message.shouldForceResync;
|
object.shouldForceResync = message.shouldForceResync;
|
||||||
|
var keys2;
|
||||||
|
if (message.playerOpPatternToSkillId && (keys2 = Object.keys(message.playerOpPatternToSkillId)).length) {
|
||||||
|
object.playerOpPatternToSkillId = {};
|
||||||
|
for (var j = 0; j < keys2.length; ++j)
|
||||||
|
object.playerOpPatternToSkillId[keys2[j]] = message.playerOpPatternToSkillId[keys2[j]];
|
||||||
|
}
|
||||||
return object;
|
return object;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -98,6 +98,7 @@ type RoomDownsyncFrame struct {
|
|||||||
FireballBullets []*FireballBullet
|
FireballBullets []*FireballBullet
|
||||||
BackendUnconfirmedMask uint64
|
BackendUnconfirmedMask uint64
|
||||||
ShouldForceResync bool
|
ShouldForceResync bool
|
||||||
|
PlayerOpPatternToSkillId map[int]int
|
||||||
}
|
}
|
||||||
|
|
||||||
type InputFrameDownsync struct {
|
type InputFrameDownsync struct {
|
||||||
|
@ -62,6 +62,33 @@ func NewPlayerDownsyncJs(id, virtualGridX, virtualGridY, dirX, dirY, velX, velY,
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func NewMeleeBulletJs(battleLocalId, startupFrames, activeFrames, recoveryFrames, recoveryFramesOnBlock, recoveryFramesOnHit, hitStunFrames, blockStunFrames, releaseTriggerType, damage, offenderJoinIndex, offenderPlayerId int32, pushback, hitboxOffset, selfMoveforwardX, selfMoveforwardY, hitboxSizeX, hitboxSizeY float64) *js.Object {
|
||||||
|
return js.MakeWrapper(&MeleeBullet{
|
||||||
|
Bullet: Bullet{
|
||||||
|
BattleLocalId: battleLocalId,
|
||||||
|
StartupFrames: startupFrames,
|
||||||
|
ActiveFrames: activeFrames,
|
||||||
|
RecoveryFrames: recoveryFrames,
|
||||||
|
RecoveryFramesOnBlock: recoveryFramesOnBlock,
|
||||||
|
RecoveryFramesOnHit: recoveryFramesOnHit,
|
||||||
|
HitboxOffset: hitboxOffset,
|
||||||
|
HitStunFrames: hitStunFrames,
|
||||||
|
BlockStunFrames: blockStunFrames,
|
||||||
|
Pushback: pushback,
|
||||||
|
ReleaseTriggerType: releaseTriggerType,
|
||||||
|
Damage: damage,
|
||||||
|
|
||||||
|
SelfMoveforwardX: selfMoveforwardX,
|
||||||
|
SelfMoveforwardY: selfMoveforwardY,
|
||||||
|
HitboxSizeX: hitboxSizeX,
|
||||||
|
HitboxSizeY: hitboxSizeY,
|
||||||
|
|
||||||
|
OffenderJoinIndex: offenderJoinIndex,
|
||||||
|
OffenderPlayerId: offenderPlayerId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
func NewRoomDownsyncFrameJs(id int32, playersArr []*PlayerDownsync, meleeBullets []*MeleeBullet) *js.Object {
|
func NewRoomDownsyncFrameJs(id int32, playersArr []*PlayerDownsync, meleeBullets []*MeleeBullet) *js.Object {
|
||||||
// [WARNING] Avoid using "pb.RoomDownsyncFrame" here, in practive "MakeFullWrapper" doesn't expose the public fields for a "protobuf struct" as expected and requires helper functions like "GetCollisionSpaceObjsJs".
|
// [WARNING] Avoid using "pb.RoomDownsyncFrame" here, in practive "MakeFullWrapper" doesn't expose the public fields for a "protobuf struct" as expected and requires helper functions like "GetCollisionSpaceObjsJs".
|
||||||
return js.MakeFullWrapper(&RoomDownsyncFrame{
|
return js.MakeFullWrapper(&RoomDownsyncFrame{
|
||||||
@ -112,6 +139,7 @@ func main() {
|
|||||||
"NewPolygon2DJs": NewPolygon2DJs,
|
"NewPolygon2DJs": NewPolygon2DJs,
|
||||||
"NewBarrierJs": NewBarrierJs,
|
"NewBarrierJs": NewBarrierJs,
|
||||||
"NewPlayerDownsyncJs": NewPlayerDownsyncJs,
|
"NewPlayerDownsyncJs": NewPlayerDownsyncJs,
|
||||||
|
"NewMeleeBulletJs": NewMeleeBulletJs,
|
||||||
"NewRoomDownsyncFrameJs": NewRoomDownsyncFrameJs,
|
"NewRoomDownsyncFrameJs": NewRoomDownsyncFrameJs,
|
||||||
"NewCollisionSpaceJs": NewCollisionSpaceJs,
|
"NewCollisionSpaceJs": NewCollisionSpaceJs,
|
||||||
"NewInputFrameDownsync": NewInputFrameDownsync,
|
"NewInputFrameDownsync": NewInputFrameDownsync,
|
||||||
|
Loading…
Reference in New Issue
Block a user