From 0ab95842a66b6af8263c6f4dbf0ea5c08dfd950b Mon Sep 17 00:00:00 2001 From: Uladzislau Nikalayevich Date: Sun, 14 Jul 2024 17:59:13 +0300 Subject: [PATCH] Fix streaming size check --- Client/mods/deathmatch/logic/CClientIMGManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Client/mods/deathmatch/logic/CClientIMGManager.cpp b/Client/mods/deathmatch/logic/CClientIMGManager.cpp index ea85f045d55..6a8c6e7e6d8 100644 --- a/Client/mods/deathmatch/logic/CClientIMGManager.cpp +++ b/Client/mods/deathmatch/logic/CClientIMGManager.cpp @@ -129,7 +129,8 @@ void CClientIMGManager::UpdateStreamerBufferSize() m_LargestFileSizeBlocks = CalculateLargestFile(); // Only update if necessary, otherwise leave it be [User might've set it manually - we don't want to touch that] - if (const auto s = g_pGame->GetStreaming(); m_LargestFileSizeBlocks > s->GetStreamingBufferSize()) { + if (const auto s = g_pGame->GetStreaming(); m_LargestFileSizeBlocks * 2048 > s->GetStreamingBufferSize()) + { s->SetStreamingBufferSize(m_LargestFileSizeBlocks); } }