Finally fixed inconsistent pushbacks between frontend and backend.

This commit is contained in:
genxium
2022-12-26 22:42:26 +08:00
parent bb6055f48c
commit 335e11e925
8 changed files with 61 additions and 50 deletions

View File

@@ -920,8 +920,7 @@ batchInputFrameIdRange=[${batch[0].inputFrameId}, ${batch[batch.length - 1].inpu
if (self.lastAllConfirmedInputFrameId >= delayedInputFrameId && !self.equalRoomDownsyncFrames(othersForcedDownsyncRenderFrame, rdf)) {
console.warn(`Mismatched render frame@rdf.id=${rdf.id} w/ inputFrameId=${delayedInputFrameId}:
rdf=${JSON.stringify(rdf)}
othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame)}
${self._stringifyRdfIdToActuallyUsedInput()}`);
othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame)}`);
// closeWSConnection(constants.RET_CODE.CLIENT_MISMATCHED_RENDER_FRAME, "");
// self.onManualRejoinRequired("[DEBUG] CLIENT_MISMATCHED_RENDER_FRAME");
rdf = othersForcedDownsyncRenderFrame;

View File

@@ -197,7 +197,7 @@ window.initPersistentSessionClient = function(onopenCb, expectedRoomId) {
break;
case constants.RET_CODE.BATTLE_STOPPED:
// deliberately do nothing
console.warn(`${mapIns._stringifyRdfIdToActuallyUsedInput()}`);
//console.warn(`${mapIns._stringifyRdfIdToActuallyUsedInput()}`);
break;
case constants.RET_CODE.PLAYER_NOT_ADDABLE_TO_ROOM:
case constants.RET_CODE.PLAYER_NOT_READDABLE_TO_ROOM:
@@ -212,7 +212,7 @@ window.initPersistentSessionClient = function(onopenCb, expectedRoomId) {
case constants.RET_CODE.PLAYER_NOT_FOUND:
case constants.RET_CODE.PLAYER_CHEATING:
case 1006: // Peer(i.e. the backend) gone unexpectedly
console.warn(`${mapIns._stringifyRdfIdToActuallyUsedInput()}`);
//console.warn(`${mapIns._stringifyRdfIdToActuallyUsedInput()}`);
window.clearLocalStorageAndBackToLoginScene(true);
break;
default: