Minor update again.

This commit is contained in:
genxium
2023-02-01 22:55:27 +08:00
parent 5cfcac6cf6
commit c75f642011
6 changed files with 7 additions and 7 deletions

View File

@@ -80,6 +80,7 @@ NetworkDoctor.prototype.logSkippedRenderFrameCnt = function() {
}
NetworkDoctor.prototype.isTooFast = function(mapIns) {
return false;
const [sendingFps, srvDownsyncFps, peerUpsyncFps, rollbackFrames, skippedRenderFrameCnt] = this.stats();
if (sendingFps >= this.inputRateThreshold + 3) {
// Don't send too fast
@@ -97,7 +98,7 @@ NetworkDoctor.prototype.isTooFast = function(mapIns) {
if (mapIns.lastIndividuallyConfirmedInputFrameId[k] >= minInputFrameIdFront) continue;
minInputFrameIdFront = mapIns.lastIndividuallyConfirmedInputFrameId[k];
}
if ((selfInputFrameIdFront > minInputFrameIdFront) && ((selfInputFrameIdFront - minInputFrameIdFront) > (mapIns.inputFrameUpsyncDelayTolerance+2))) {
if ((selfInputFrameIdFront > minInputFrameIdFront) && ((selfInputFrameIdFront - minInputFrameIdFront) > (mapIns.inputFrameUpsyncDelayTolerance >> 1))) {
// first comparison condition is to avoid numeric overflow
console.log(`Game logic ticking too fast, selfInputFrameIdFront=${selfInputFrameIdFront}, minInputFrameIdFront=${minInputFrameIdFront}, inputFrameUpsyncDelayTolerance=${mapIns.inputFrameUpsyncDelayTolerance}`);
return true;

File diff suppressed because one or more lines are too long