mirror of
https://github.com/genxium/DelayNoMore
synced 2026-04-01 10:52:56 +00:00
Initial recovery of MeleeBullet in online battle.
This commit is contained in:
@@ -4724,7 +4724,7 @@ $packages["resolv"] = (function() {
|
||||
return $pkg;
|
||||
})();
|
||||
$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"];
|
||||
resolv = $packages["resolv"];
|
||||
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.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;
|
||||
if (arguments.length === 0) {
|
||||
this.Id = 0;
|
||||
@@ -4897,6 +4897,7 @@ $packages["jsexport/battle"] = (function() {
|
||||
this.FireballBullets = sliceType$10.nil;
|
||||
this.BackendUnconfirmedMask = new $Uint64(0, 0);
|
||||
this.ShouldForceResync = false;
|
||||
this.PlayerOpPatternToSkillId = false;
|
||||
return;
|
||||
}
|
||||
this.Id = Id_;
|
||||
@@ -4906,6 +4907,7 @@ $packages["jsexport/battle"] = (function() {
|
||||
this.FireballBullets = FireballBullets_;
|
||||
this.BackendUnconfirmedMask = BackendUnconfirmedMask_;
|
||||
this.ShouldForceResync = ShouldForceResync_;
|
||||
this.PlayerOpPatternToSkillId = PlayerOpPatternToSkillId_;
|
||||
});
|
||||
InputFrameDownsync = $pkg.InputFrameDownsync = $newType(0, $kindStruct, "battle.InputFrameDownsync", true, "jsexport/battle", true, function(InputFrameId_, InputList_, ConfirmedList_) {
|
||||
this.$val = this;
|
||||
@@ -4981,6 +4983,7 @@ $packages["jsexport/battle"] = (function() {
|
||||
ptrType$9 = $ptrType(Vec2D);
|
||||
sliceType$12 = $sliceType(ptrType$9);
|
||||
ptrType$10 = $ptrType(Polygon2D);
|
||||
mapType = $mapType($Int, $Int);
|
||||
ptrType$11 = $ptrType(RingBuffer);
|
||||
NewRingBuffer = function(n) {
|
||||
var n;
|
||||
@@ -5752,7 +5755,7 @@ $packages["jsexport/battle"] = (function() {
|
||||
thatPlayerInNextFrame$3.VirtualGridY = _tuple$6[1];
|
||||
_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;
|
||||
};
|
||||
$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: ""}]);
|
||||
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: ""}]);
|
||||
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: ""}]);
|
||||
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: ""}]);
|
||||
@@ -5882,7 +5885,7 @@ $packages["jsexport/battle"] = (function() {
|
||||
return $pkg;
|
||||
})();
|
||||
$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"];
|
||||
battle = $packages["jsexport/battle"];
|
||||
resolv = $packages["resolv"];
|
||||
@@ -5902,21 +5905,22 @@ $packages["jsexport"] = (function() {
|
||||
funcType$1 = $funcType([ptrType, sliceType$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$4 = $funcType([$Int32, sliceType$2, sliceType$3], [ptrType$5], false);
|
||||
funcType$5 = $funcType([$Int, $Int, $Int, $Int], [ptrType$5], false);
|
||||
funcType$6 = $funcType([$Int32, sliceType, $Uint64], [ptrType$5], false);
|
||||
funcType$7 = $funcType([$Int32], [ptrType$5], false);
|
||||
funcType$8 = $funcType([$Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $emptyInterface, $String], [ptrType$5], false);
|
||||
funcType$9 = $funcType([ptrType$1, $Float64, $Float64, $emptyInterface, $String], [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([$Int32, sliceType$2, sliceType$3], [ptrType$5], false);
|
||||
funcType$6 = $funcType([$Int, $Int, $Int, $Int], [ptrType$5], false);
|
||||
funcType$7 = $funcType([$Int32, sliceType, $Uint64], [ptrType$5], false);
|
||||
funcType$8 = $funcType([$Int32], [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);
|
||||
funcType$10 = $funcType([ptrType$6], [sliceType$5], false);
|
||||
funcType$11 = $funcType([ptrType$6], [sliceType$5], false);
|
||||
ptrType$7 = $ptrType(battle.RingBuffer);
|
||||
ptrType$8 = $ptrType(battle.RoomDownsyncFrame);
|
||||
ptrType$9 = $ptrType(resolv.Object);
|
||||
mapType = $mapType($Int32, ptrType$9);
|
||||
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([$Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64], [$Float64, $Float64], 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$13 = $funcType([$Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64], [$Float64, $Float64], false);
|
||||
mapType$2 = $mapType($String, $emptyInterface);
|
||||
NewInputFrameDownsync = function(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));
|
||||
};
|
||||
$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) {
|
||||
var {$24r, _r, id, meleeBullets, playersArr, $s, $r, $c} = $restore(this, {id, playersArr, meleeBullets});
|
||||
/* */ $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;
|
||||
$s = 2; case 2: return $24r;
|
||||
/* */ } 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;
|
||||
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() {
|
||||
$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
|
||||
uint64 backendUnconfirmedMask = 5; // Indexed by "joinIndex", same compression concern as stated in InputFrameDownsync
|
||||
bool shouldForceResync = 6;
|
||||
map<int32, int32> playerOpPatternToSkillId = 7;
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
210.2224973754617,
|
||||
216.50635094610968,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
@@ -403,7 +403,6 @@ cc.Class({
|
||||
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".
|
||||
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;
|
||||
|
||||
const tiledMapIns = self.node.getComponent(cc.TiledMap);
|
||||
@@ -504,7 +503,7 @@ cc.Class({
|
||||
}
|
||||
self.selfPlayerInfo = JSON.parse(cc.sys.localStorage.getItem('selfPlayer'));
|
||||
Object.assign(self.selfPlayerInfo, {
|
||||
id: self.selfPlayerInfo.playerId
|
||||
Id: self.selfPlayerInfo.playerId
|
||||
});
|
||||
|
||||
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)
|
||||
self.playerOpPatternToSkillId = pbRdf.playerOpPatternToSkillId;
|
||||
self._initPlayerRichInfoDict(rdf.PlayersArr);
|
||||
|
||||
// Show the top status indicators for IN_BATTLE
|
||||
@@ -744,14 +744,14 @@ cc.Class({
|
||||
&&
|
||||
null == firstPredictedYetIncorrectInputFrameId
|
||||
&&
|
||||
!self.equalInputLists(localInputFrame.inputList, inputFrameDownsync.inputList)
|
||||
!self.equalInputLists(localInputFrame.InputList, inputFrameDownsync.inputList)
|
||||
) {
|
||||
firstPredictedYetIncorrectInputFrameId = inputFrameDownsyncId;
|
||||
}
|
||||
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}`);
|
||||
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) {
|
||||
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} [spAtkLookupFrames] BattleColliderInfo spAtkLookupFrames
|
||||
* @property {number|null} [renderCacheSize] BattleColliderInfo renderCacheSize
|
||||
* @property {Object.<string,protos.MeleeBullet>|null} [meleeSkillConfig] BattleColliderInfo meleeSkillConfig
|
||||
* @property {number|null} [snapIntoPlatformOverlap] BattleColliderInfo snapIntoPlatformOverlap
|
||||
* @property {number|null} [snapIntoPlatformThreshold] BattleColliderInfo snapIntoPlatformThreshold
|
||||
* @property {number|null} [jumpingInitVelY] BattleColliderInfo jumpingInitVelY
|
||||
@@ -4620,7 +4619,6 @@ $root.protos = (function() {
|
||||
* @param {protos.IBattleColliderInfo=} [properties] Properties to set
|
||||
*/
|
||||
function BattleColliderInfo(properties) {
|
||||
this.meleeSkillConfig = {};
|
||||
if (properties)
|
||||
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
||||
if (properties[keys[i]] != null)
|
||||
@@ -4811,14 +4809,6 @@ $root.protos = (function() {
|
||||
*/
|
||||
BattleColliderInfo.prototype.renderCacheSize = 0;
|
||||
|
||||
/**
|
||||
* BattleColliderInfo meleeSkillConfig.
|
||||
* @member {Object.<string,protos.MeleeBullet>} meleeSkillConfig
|
||||
* @memberof protos.BattleColliderInfo
|
||||
* @instance
|
||||
*/
|
||||
BattleColliderInfo.prototype.meleeSkillConfig = $util.emptyObject;
|
||||
|
||||
/**
|
||||
* BattleColliderInfo snapIntoPlatformOverlap.
|
||||
* @member {number} snapIntoPlatformOverlap
|
||||
@@ -4945,23 +4935,18 @@ $root.protos = (function() {
|
||||
writer.uint32(/* id 22, wireType 0 =*/176).int32(message.spAtkLookupFrames);
|
||||
if (message.renderCacheSize != null && Object.hasOwnProperty.call(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"))
|
||||
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"))
|
||||
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"))
|
||||
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"))
|
||||
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"))
|
||||
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"))
|
||||
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"))
|
||||
writer.uint32(/* id 999, wireType 0 =*/7992).bool(message.frameDataLoggingEnabled);
|
||||
return writer;
|
||||
@@ -4994,7 +4979,7 @@ $root.protos = (function() {
|
||||
BattleColliderInfo.decode = function decode(reader, length) {
|
||||
if (!(reader instanceof $Reader))
|
||||
reader = $Reader.create(reader);
|
||||
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protos.BattleColliderInfo(), key, value;
|
||||
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protos.BattleColliderInfo();
|
||||
while (reader.pos < end) {
|
||||
var tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@@ -5091,49 +5076,26 @@ $root.protos = (function() {
|
||||
break;
|
||||
}
|
||||
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();
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
case 25: {
|
||||
message.snapIntoPlatformThreshold = reader.double();
|
||||
break;
|
||||
}
|
||||
case 27: {
|
||||
case 26: {
|
||||
message.jumpingInitVelY = reader.int32();
|
||||
break;
|
||||
}
|
||||
case 28: {
|
||||
case 27: {
|
||||
message.gravityX = reader.int32();
|
||||
break;
|
||||
}
|
||||
case 29: {
|
||||
case 28: {
|
||||
message.gravityY = reader.int32();
|
||||
break;
|
||||
}
|
||||
case 30: {
|
||||
case 29: {
|
||||
message.collisionMinStep = reader.int32();
|
||||
break;
|
||||
}
|
||||
@@ -5245,20 +5207,6 @@ $root.protos = (function() {
|
||||
if (message.renderCacheSize != null && message.hasOwnProperty("renderCacheSize"))
|
||||
if (!$util.isInteger(message.renderCacheSize))
|
||||
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 (typeof message.snapIntoPlatformOverlap !== "number")
|
||||
return "snapIntoPlatformOverlap: number expected";
|
||||
@@ -5355,16 +5303,6 @@ $root.protos = (function() {
|
||||
message.spAtkLookupFrames = object.spAtkLookupFrames | 0;
|
||||
if (object.renderCacheSize != null)
|
||||
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)
|
||||
message.snapIntoPlatformOverlap = Number(object.snapIntoPlatformOverlap);
|
||||
if (object.snapIntoPlatformThreshold != null)
|
||||
@@ -5395,8 +5333,6 @@ $root.protos = (function() {
|
||||
if (!options)
|
||||
options = {};
|
||||
var object = {};
|
||||
if (options.objects || options.defaults)
|
||||
object.meleeSkillConfig = {};
|
||||
if (options.defaults) {
|
||||
object.stageName = "";
|
||||
object.stageDiscreteW = 0;
|
||||
@@ -5489,12 +5425,6 @@ $root.protos = (function() {
|
||||
object.spAtkLookupFrames = message.spAtkLookupFrames;
|
||||
if (message.renderCacheSize != null && message.hasOwnProperty("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"))
|
||||
object.snapIntoPlatformOverlap = options.json && !isFinite(message.snapIntoPlatformOverlap) ? String(message.snapIntoPlatformOverlap) : message.snapIntoPlatformOverlap;
|
||||
if (message.snapIntoPlatformThreshold != null && message.hasOwnProperty("snapIntoPlatformThreshold"))
|
||||
@@ -5553,6 +5483,7 @@ $root.protos = (function() {
|
||||
* @property {Array.<protos.MeleeBullet>|null} [meleeBullets] RoomDownsyncFrame meleeBullets
|
||||
* @property {number|Long|null} [backendUnconfirmedMask] RoomDownsyncFrame backendUnconfirmedMask
|
||||
* @property {boolean|null} [shouldForceResync] RoomDownsyncFrame shouldForceResync
|
||||
* @property {Object.<string,number>|null} [playerOpPatternToSkillId] RoomDownsyncFrame playerOpPatternToSkillId
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -5566,6 +5497,7 @@ $root.protos = (function() {
|
||||
function RoomDownsyncFrame(properties) {
|
||||
this.playersArr = [];
|
||||
this.meleeBullets = [];
|
||||
this.playerOpPatternToSkillId = {};
|
||||
if (properties)
|
||||
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
||||
if (properties[keys[i]] != null)
|
||||
@@ -5620,6 +5552,14 @@ $root.protos = (function() {
|
||||
*/
|
||||
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.
|
||||
* @function create
|
||||
@@ -5658,6 +5598,9 @@ $root.protos = (function() {
|
||||
writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.backendUnconfirmedMask);
|
||||
if (message.shouldForceResync != null && Object.hasOwnProperty.call(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;
|
||||
};
|
||||
|
||||
@@ -5688,7 +5631,7 @@ $root.protos = (function() {
|
||||
RoomDownsyncFrame.decode = function decode(reader, length) {
|
||||
if (!(reader instanceof $Reader))
|
||||
reader = $Reader.create(reader);
|
||||
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protos.RoomDownsyncFrame();
|
||||
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protos.RoomDownsyncFrame(), key, value;
|
||||
while (reader.pos < end) {
|
||||
var tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@@ -5720,6 +5663,29 @@ $root.protos = (function() {
|
||||
message.shouldForceResync = reader.bool();
|
||||
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:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
@@ -5785,6 +5751,17 @@ $root.protos = (function() {
|
||||
if (message.shouldForceResync != null && message.hasOwnProperty("shouldForceResync"))
|
||||
if (typeof message.shouldForceResync !== "boolean")
|
||||
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;
|
||||
};
|
||||
|
||||
@@ -5842,6 +5819,13 @@ $root.protos = (function() {
|
||||
message.backendUnconfirmedMask = new $util.LongBits(object.backendUnconfirmedMask.low >>> 0, object.backendUnconfirmedMask.high >>> 0).toNumber(true);
|
||||
if (object.shouldForceResync != null)
|
||||
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;
|
||||
};
|
||||
|
||||
@@ -5862,6 +5846,8 @@ $root.protos = (function() {
|
||||
object.playersArr = [];
|
||||
object.meleeBullets = [];
|
||||
}
|
||||
if (options.objects || options.defaults)
|
||||
object.playerOpPatternToSkillId = {};
|
||||
if (options.defaults) {
|
||||
object.id = 0;
|
||||
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;
|
||||
if (message.shouldForceResync != null && message.hasOwnProperty("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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user