diff --git a/frontend/assets/scenes/login.fire b/frontend/assets/scenes/login.fire index 83c685f..6ee6c32 100644 --- a/frontend/assets/scenes/login.fire +++ b/frontend/assets/scenes/login.fire @@ -461,7 +461,7 @@ "array": [ 0, 0, - 209.6693197428241, + 209.73151519075364, 0, 0, 0, diff --git a/frontend/assets/scenes/offline_map.fire b/frontend/assets/scenes/offline_map.fire index dc3e129..b4de1b3 100644 --- a/frontend/assets/scenes/offline_map.fire +++ b/frontend/assets/scenes/offline_map.fire @@ -547,7 +547,7 @@ "array": [ 0, 0, - 209.6693197428241, + 209.73151519075364, 0, 0, 0, diff --git a/frontend/assets/scripts/Map.js b/frontend/assets/scripts/Map.js index 0ff0609..3123385 100644 --- a/frontend/assets/scripts/Map.js +++ b/frontend/assets/scripts/Map.js @@ -735,6 +735,7 @@ cc.Class({ self.hideFindingPlayersGUI(); console.warn('On battle resynced! renderFrameId=', rdf.Id); } + self.renderFrameId = rdf.Id; self.lastRenderFrameIdTriggeredAt = performance.now(); // In this case it must be true that "rdf.id > chaserRenderFrameId". @@ -745,6 +746,10 @@ cc.Class({ self.ctrl = canvasNode.getComponent("TouchEventsManager"); self.enableInputControls(); self.transitToState(ALL_MAP_STATES.VISUAL); + + const selfPlayerRichInfo = self.playerRichInfoDict.get(self.selfPlayerInfo.Id); + const newMapPos = cc.v2().sub(selfPlayerRichInfo.node.position); + self.node.setPosition(newMapPos); self.battleState = ALL_BATTLE_STATES.IN_BATTLE; } @@ -926,8 +931,9 @@ batchInputFrameIdRange=[${batch[0].inputFrameId}, ${batch[batch.length - 1].inpu fromUDP=${fromUDP}`); self.chaserRenderFrameId = renderFrameId1; let rollbackFrames = (self.renderFrameId - self.chaserRenderFrameId); - if (0 > rollbackFrames) + if (0 > rollbackFrames) { rollbackFrames = 0; + } self.networkDoctor.logRollbackFrames(rollbackFrames); }, @@ -1112,7 +1118,12 @@ fromUDP=${fromUDP}`); // Inside the following "self.rollbackAndChase" actually ROLLS FORWARD w.r.t. the corresponding delayedInputFrame, REGARDLESS OF whether or not "self.chaserRenderFrameId == self.renderFrameId" now. const latestRdfResults = self.rollbackAndChase(self.renderFrameId, self.renderFrameId + 1, self.gopkgsCollisionSys, self.gopkgsCollisionSysMap, false); - self.networkDoctor.logRollbackFrames(self.renderFrameId - self.chaserRenderFrameId); + + let rollbackFrames = (self.renderFrameId - self.chaserRenderFrameId); + if (0 > rollbackFrames) { + rollbackFrames = 0; + } + self.networkDoctor.logRollbackFrames(rollbackFrames); let prevRdf = latestRdfResults[0], rdf = latestRdfResults[1]; /* diff --git a/frontend/build-templates/jsb-link/frameworks/runtime-src/Classes/AppDelegate.cpp b/frontend/build-templates/jsb-link/frameworks/runtime-src/Classes/AppDelegate.cpp index d2339bd..8c346e3 100644 --- a/frontend/build-templates/jsb-link/frameworks/runtime-src/Classes/AppDelegate.cpp +++ b/frontend/build-templates/jsb-link/frameworks/runtime-src/Classes/AppDelegate.cpp @@ -27,7 +27,7 @@ #include "cocos2d.h" -#include "cocos/audio/include/AudioEngine.h" +//#include "cocos/audio/include/AudioEngine.h" #include "cocos/scripting/js-bindings/manual/jsb_module_register.hpp" #include "cocos/scripting/js-bindings/manual/jsb_global.h" #include "cocos/scripting/js-bindings/jswrapper/SeApi.h" @@ -81,13 +81,13 @@ void AppDelegate::applicationDidEnterBackground() { EventDispatcher::dispatchEnterBackgroundEvent(); // Ensure that handle AudioEngine enter background after all enter background events are handled - AudioEngine::onEnterBackground(); + //AudioEngine::onEnterBackground(); } // this function will be called when the app is active again void AppDelegate::applicationWillEnterForeground() { // Ensure that handle AudioEngine enter foreground before all enter foreground events are handled - AudioEngine::onEnterForeground(); + //AudioEngine::onEnterForeground(); EventDispatcher::dispatchEnterForegroundEvent(); } diff --git a/frontend/settings/project.json b/frontend/settings/project.json index e14a34c..c1f2a7e 100644 --- a/frontend/settings/project.json +++ b/frontend/settings/project.json @@ -33,6 +33,8 @@ "design-resolution-height": 640, "design-resolution-width": 960, "excluded-modules": [ + "Audio", + "AudioSource", "Collider", "DragonBones", "Geom Utils", @@ -43,8 +45,11 @@ "Physics", "PageView", "PageViewIndicator", + "ParticleSystem", "RichText", "Slider", + "ScrollBar", + "ScrollView", "Spine Skeleton", "StudioComponent", "VideoPlayer", @@ -78,6 +83,5 @@ "width": 960 }, "use-customize-simulator": true, - "use-project-simulator-setting": false, - "start-scene": "current" + "use-project-simulator-setting": false }