1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-01 03:05:24 +01:00

Prevent progress bar from flickering during map download (#25067)

This commit is contained in:
Aaron van Geffen
2025-08-29 22:36:17 +02:00
committed by GitHub
parent d23c5ea332
commit c3dea57e41
2 changed files with 3 additions and 1 deletions

View File

@@ -39,6 +39,7 @@
- Fix: [#25005] The Corkscrew Roller Coaster inline twist inverted supports draw below the track.
- Fix: [#25006] The Twister Roller Coaster inline twists do not draw in tunnels at some angles.
- Fix: [#25046] Zooming with the zoom buttons on the extra viewport is not focused on the centre of the viewport.
- Fix: [#25067] Progress bars can flicker when downloading maps in multiplayer mode.
0.4.25 (2025-08-03)
------------------------------------------------------------------------

View File

@@ -2776,6 +2776,8 @@ void NetworkBase::Client_Handle_MAP([[maybe_unused]] NetworkConnection& connecti
_serverTickData.clear();
_clientMapLoaded = false;
OpenNetworkProgress(STR_MULTIPLAYER_DOWNLOADING_MAP);
}
if (size > chunk_buffer.size())
{
@@ -2785,7 +2787,6 @@ void NetworkBase::Client_Handle_MAP([[maybe_unused]] NetworkConnection& connecti
const auto currentProgressKiB = (offset + chunksize) / 1024;
const auto totalSizeKiB = size / 1024;
OpenNetworkProgress(STR_MULTIPLAYER_DOWNLOADING_MAP);
GetContext().SetProgress(currentProgressKiB, totalSizeKiB, STR_STRING_M_OF_N_KIB);
std::memcpy(&chunk_buffer[offset], const_cast<void*>(static_cast<const void*>(packet.Read(chunksize))), chunksize);