From 5cdc04d6d61f40e89a5da3d27ae9575f4a419a08 Mon Sep 17 00:00:00 2001 From: Uladzislau Nikalayevich Date: Sun, 14 Jul 2024 20:12:12 +0300 Subject: [PATCH] Fix streaming size check after engineAddImage (#3566) Fix streaming size check Co-authored-by: Pirulax --- 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 ea85f045d5..6a8c6e7e6d 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); } }