Fixed unit mistake

This commit is contained in:
kmyuhkyuk
2026-03-25 23:15:39 +08:00
parent 1bf1e32b3d
commit 301b0aecf3
@@ -45,19 +45,19 @@ namespace SlayTheSpire2.LAN.Multiplayer.Patchs
var startTime = DateTime.Now; var startTime = DateTime.Now;
var lastResendTick = DateTime.Now; var lastResendTick = DateTime.Now;
const int timeoutMs = 30; const int timeoutSeconds = 30;
const int resendIntervalMs = 5; const int resendIntervalSeconds = 5;
while (!syncCompletionSource.Task.IsCompleted) while (!syncCompletionSource.Task.IsCompleted)
{ {
if ((DateTime.Now - startTime).TotalMilliseconds > timeoutMs) if ((DateTime.Now - startTime).TotalSeconds > timeoutSeconds)
{ {
logger.Warn("Sync timeout, skipping waiting for players"); logger.Warn("Sync timeout, skipping waiting for players");
break; break;
} }
if (netService.Type == NetGameType.Host && if (netService.Type == NetGameType.Host &&
(DateTime.Now - lastResendTick).TotalMilliseconds > resendIntervalMs && rngSet != null && (DateTime.Now - lastResendTick).TotalSeconds > resendIntervalSeconds && rngSet != null &&
sharedRelicGrabBag != null) sharedRelicGrabBag != null)
{ {
logger.Debug("Resending rng sync message"); logger.Debug("Resending rng sync message");