微调追帧策略

This commit is contained in:
ALIENJACK\alien 2024-11-12 14:47:57 +08:00
parent 0dd21f6d50
commit bddb84c57d
2 changed files with 5 additions and 4 deletions

View File

@ -119,7 +119,7 @@ namespace AxibugEmuOnline.Client
LastTestInput = rawData; LastTestInput = rawData;
App.log.Debug($"{DateTime.Now.ToString("hh:mm:ss.fff")} Input F:{App.roomMgr.netReplay.mCurrClientFrameIdx} | I:{rawData}"); App.log.Debug($"{DateTime.Now.ToString("hh:mm:ss.fff")} Input F:{App.roomMgr.netReplay.mCurrClientFrameIdx} | I:{rawData}");
} }
App.roomMgr.SendRoomSingelPlayerInput((uint)App.roomMgr.netReplay.mCurrClientFrameIdx, rawData); App.roomMgr.SendRoomSingelPlayerInput(frameIndex, rawData);
} }
else else
{ {

View File

@ -72,9 +72,10 @@ namespace AxibugEmuOnline.Client
var frameGap = App.roomMgr.netReplay.mDiffFrameCount; var frameGap = App.roomMgr.netReplay.mDiffFrameCount;
if (frameGap > 10000) return; if (frameGap > 10000) return;
if (frameGap > 2 && frameGap < 6) skipFrameCount = 1; if (frameGap <= 2) skipFrameCount = 0;
else if (frameGap > 7 && frameGap < 12) skipFrameCount = 2; if (frameGap > 2 && frameGap < 6) skipFrameCount = 1 + 1;
else if (frameGap > 13 && frameGap < 20) skipFrameCount = 3; else if (frameGap > 7 && frameGap < 12) skipFrameCount = 2 + 1;
else if (frameGap > 13 && frameGap < 20) skipFrameCount = 3 + 1;
else skipFrameCount = frameGap - 2; else skipFrameCount = frameGap - 2;
if (skipFrameCount > 0) App.log.Debug($"SKIP FRAME : {skipFrameCount}"); if (skipFrameCount > 0) App.log.Debug($"SKIP FRAME : {skipFrameCount}");