From 870f869353eecb0e0a3a1e15c8ac6e10f08af892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Harabie=C5=84?= Date: Fri, 23 Aug 2024 20:46:47 +0200 Subject: [PATCH] Fix level download regression in dedicated server Introduced in 9bcfa83cf1fbd890a8eca9ff9b0bd263571dee7e Fixes #252 --- game_patch/main/main.cpp | 2 +- game_patch/multi/level_download.cpp | 2 +- game_patch/multi/multi.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/game_patch/main/main.cpp b/game_patch/main/main.cpp index 78a973ac..3bee6da7 100644 --- a/game_patch/main/main.cpp +++ b/game_patch/main/main.cpp @@ -106,6 +106,7 @@ FunHook rf_do_frame_hook{ int result = rf_do_frame_hook.call_target(); maybe_autosave(); debug_do_frame_post(); + multi_level_download_update(); return result; }, }; @@ -126,7 +127,6 @@ CodeInjection after_frame_render_hook{ if (!rf::is_dedicated_server) { // Draw on top (after scene) frametime_render_ui(); - multi_render_level_download_progress(); #if !defined(NDEBUG) && defined(HAS_EXPERIMENTAL) experimental_render(); #endif diff --git a/game_patch/multi/level_download.cpp b/game_patch/multi/level_download.cpp index 94b5dba3..861f6800 100644 --- a/game_patch/multi/level_download.cpp +++ b/game_patch/multi/level_download.cpp @@ -694,7 +694,7 @@ void level_download_init() download_level_force_cmd.register_cmd(); } -void multi_render_level_download_progress() +void multi_level_download_update() { LevelDownloadManager::instance().process(); } diff --git a/game_patch/multi/multi.h b/game_patch/multi/multi.h index 9a21b9ea..035790fa 100644 --- a/game_patch/multi/multi.h +++ b/game_patch/multi/multi.h @@ -78,7 +78,7 @@ struct DashFactionServerInfo std::optional max_fov; }; -void multi_render_level_download_progress(); +void multi_level_download_update(); void multi_do_patch(); void multi_after_full_game_init(); void multi_init_player(rf::Player* player);