From de9f3c90902bc6da98359be996887a55964e011e Mon Sep 17 00:00:00 2001 From: genxium Date: Mon, 27 Feb 2023 14:58:21 +0800 Subject: [PATCH] Minor update. --- battle_srv/models/room.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/battle_srv/models/room.go b/battle_srv/models/room.go index 246a621..2ab7ed3 100644 --- a/battle_srv/models/room.go +++ b/battle_srv/models/room.go @@ -847,7 +847,7 @@ func (pR *Room) OnDismissed() { pR.RollbackEstimatedDtNanos = 16666666 // A little smaller than the actual per frame time, just for logging FAST FRAME dilutedServerFps := float64(58.0) // Don't set this value too small, otherwise we might miss force confirmation needs for slow tickers! pR.dilutedRollbackEstimatedDtNanos = int64(float64(pR.RollbackEstimatedDtNanos) * float64(serverFps) / dilutedServerFps) - pR.BattleDurationFrames = int32(10 * serverFps) + pR.BattleDurationFrames = int32(60 * serverFps) //pR.BattleDurationFrames = int32(20 * serverFps) pR.BattleDurationNanos = int64(pR.BattleDurationFrames) * (pR.RollbackEstimatedDtNanos + 1) pR.InputFrameUpsyncDelayTolerance = battle.ConvertToNoDelayInputFrameId(pR.NstDelayFrames) - 1 // this value should be strictly smaller than (NstDelayFrames >> InputScaleFrames), otherwise "type#1 forceConfirmation" might become a lag avalanche @@ -856,7 +856,7 @@ func (pR *Room) OnDismissed() { pR.BackendDynamicsEnabled = true // [WARNING] When "false", recovery upon reconnection wouldn't work! pR.ForceAllResyncOnAnyActiveSlowTicker = true // See tradeoff discussion in "downsyncToAllPlayers" - pR.FrameDataLoggingEnabled = true // [WARNING] DON'T ENABLE ON LONG BATTLE DURATION! It consumes A LOT OF MEMORY! + pR.FrameDataLoggingEnabled = false // [WARNING] DON'T ENABLE ON LONG BATTLE DURATION! It consumes A LOT OF MEMORY! pR.BattleUdpTunnelLock.Lock() pR.BattleUdpTunnel = nil pR.BattleUdpTunnelAddr = nil