Minor fix for frontend chaserRenderFrameId positioning and logging.

This commit is contained in:
genxium
2022-10-02 16:19:54 +08:00
parent 4d1de44ee5
commit 54d6e52498
4 changed files with 10 additions and 10 deletions

View File

@@ -947,6 +947,7 @@ cc.Class({
rdf.id > self.lastAllConfirmedRenderFrameId
) {
self.lastAllConfirmedRenderFrameId = rdf.id;
self.chaserRenderFrameId = rdf.id; // it must be true that "chaserRenderFrameId >= lastAllConfirmedRenderFrameId"
}
self._dumpToRenderCache(rdf);
return rdf;
@@ -978,7 +979,7 @@ cc.Class({
},
rollbackAndChase(renderFrameIdSt, renderFrameIdEd, collisionSys, collisionSysMap) {
if (renderFrameSt >= renderFrameIdEd) {
if (renderFrameIdSt >= renderFrameIdEd) {
return;
}

View File

@@ -179,7 +179,7 @@ window.initPersistentSessionClient = function(onopenCb, expectedRoomId) {
break;
case window.DOWNSYNC_MSG_ACT_FORCED_RESYNC:
if (window.handleInputFrameDownsyncBatch && window.handleRoomDownsyncFrame) {
console.warn("Got forced resync:", resp.toString(), " @localRenderFrameId=", mapIns.renderFrameId, ", @localRecentInputCache=", mapIns._stringifyRecentInputCache(false));
console.warn("Got forced resync:", JSON.stringify(resp), " @localRenderFrameId=", mapIns.renderFrameId, ", @localRecentInputCache=", mapIns._stringifyRecentInputCache(false));
// The following order of execution is important, because "handleInputFrameDownsyncBatch" is only available when state is IN_BATTLE
window.handleRoomDownsyncFrame(resp.rdf);
window.handleInputFrameDownsyncBatch(resp.inputFrameDownsyncBatch);