Minor fix.

This commit is contained in:
genxium 2023-02-18 12:07:56 +08:00
parent 8345d55e76
commit 618531f5c6
5 changed files with 11 additions and 13 deletions

View File

@ -426,11 +426,10 @@ func (pR *Room) StartBattle() {
// 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.NewPreallocatedRoomDownsyncFrame(len(pR.Players), 64, 64)
Id: pR.RenderFrameId, battle.CloneRoomDownsyncFrame(pR.RenderFrameId, toJsPlayers(pR.Players), 0, make([]*battle.MeleeBullet, 0), make([]*battle.FireballBullet, 0), kickoffFrameJs)
PlayersArr: toJsPlayers(pR.Players), kickoffFrameJs.CountdownNanos = pR.BattleDurationNanos
CountdownNanos: pR.BattleDurationNanos,
}
pR.RenderFrameBuffer.Put(kickoffFrameJs) pR.RenderFrameBuffer.Put(kickoffFrameJs)
// Refresh "Colliders" // Refresh "Colliders"

View File

@ -59,7 +59,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
480, 480,
320, 480,
0, 0,
0, 0,
0, 0,
@ -242,7 +242,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
128, -9.924,
0, 0,
0, 0,
0, 0,

View File

@ -461,7 +461,7 @@
"array": [ "array": [
0, 0,
0, 0,
210.4441731196186, 209.66956379694378,
0, 0,
0, 0,
0, 0,

View File

@ -91,7 +91,7 @@ NetworkDoctor.prototype.isTooFast = function(mapIns) {
// Don't send too fast // Don't send too fast
if (CC_DEBUG) { if (CC_DEBUG) {
// Printing of this message might induce a performance impact. // Printing of this message might induce a performance impact.
console.log(`Sending too fast, sendingFps=${sendingFps}`); // console.log(`Sending too fast, sendingFps=${sendingFps}`);
} }
return [true, inputFrameIdFront, sendingFps, srvDownsyncFps, peerUpsyncFps, rollbackFrames, skippedRenderFrameCnt]; return [true, inputFrameIdFront, sendingFps, srvDownsyncFps, peerUpsyncFps, rollbackFrames, skippedRenderFrameCnt];
} else { } else {
@ -109,7 +109,7 @@ NetworkDoctor.prototype.isTooFast = function(mapIns) {
// first comparison condition is to avoid numeric overflow // first comparison condition is to avoid numeric overflow
if (CC_DEBUG) { if (CC_DEBUG) {
// Printing of this message might induce a performance impact. // Printing of this message might induce a performance impact.
console.log(`Game logic ticking too fast, selfInputFrameIdFront=${inputFrameIdFront}, minInputFrameIdFront=${minInputFrameIdFront}, inputFrameUpsyncDelayTolerance=${mapIns.inputFrameUpsyncDelayTolerance}`); // console.log(`Game logic ticking too fast, selfInputFrameIdFront=${inputFrameIdFront}, minInputFrameIdFront=${minInputFrameIdFront}, inputFrameUpsyncDelayTolerance=${mapIns.inputFrameUpsyncDelayTolerance}`);
} }
return [true, inputFrameIdFront, sendingFps, srvDownsyncFps, peerUpsyncFps, rollbackFrames, skippedRenderFrameCnt]; return [true, inputFrameIdFront, sendingFps, srvDownsyncFps, peerUpsyncFps, rollbackFrames, skippedRenderFrameCnt];
} }

View File

@ -17,8 +17,7 @@
}, },
"encryptJs": false, "encryptJs": false,
"excludeScenes": [ "excludeScenes": [
"2ff474d9-0c9e-4fe3-87ec-fbff7cae85b4", "8491a86c-bec9-4813-968a-128ca01639e0"
"92160186-3e0d-4e0a-ae20-97286170ba58"
], ],
"fb-instant-games": {}, "fb-instant-games": {},
"includeSDKBox": false, "includeSDKBox": false,
@ -38,7 +37,7 @@
"REMOTE_SERVER_ROOT": "", "REMOTE_SERVER_ROOT": "",
"orientation": "portrait" "orientation": "portrait"
}, },
"startScene": "8491a86c-bec9-4813-968a-128ca01639e0", "startScene": "2ff474d9-0c9e-4fe3-87ec-fbff7cae85b4",
"title": "DelayNoMore", "title": "DelayNoMore",
"webOrientation": "landscape", "webOrientation": "landscape",
"wechatgame": { "wechatgame": {