Skip to content

Commit

Permalink
Fix streaming size check after engineAddImage (#3566)
Browse files Browse the repository at this point in the history
Fix streaming size check

Co-authored-by: Pirulax <patrikjankovics7@gmail.com>
  • Loading branch information
TheNormalnij and Pirulax authored Jul 14, 2024
1 parent 9615523 commit 5cdc04d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Client/mods/deathmatch/logic/CClientIMGManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 5cdc04d

Please sign in to comment.