1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 13:03:11 +01:00

Separate map.change and map.changed events

Also fix network plugin logic.
This commit is contained in:
Ted John
2022-03-21 22:56:21 +00:00
parent e4a10b8eb4
commit 9f96b0df33
13 changed files with 70 additions and 7 deletions

View File

@@ -203,6 +203,11 @@ void NetworkBase::Close()
_pendingPlayerLists.clear();
_pendingPlayerInfo.clear();
# ifdef ENABLE_SCRIPTING
auto& scriptEngine = GetContext().GetScriptEngine();
scriptEngine.RemoveNetworkPlugins();
# endif
gfx_invalidate_screen();
_requireClose = false;
@@ -2681,6 +2686,9 @@ void NetworkBase::Client_Handle_MAP([[maybe_unused]] NetworkConnection& connecti
GameActions::ResumeQueue();
context_force_close_window_by_class(WC_NETWORK_STATUS);
game_unload_scripts();
game_notify_map_change();
bool has_to_free = false;
uint8_t* data = &chunk_buffer[0];
size_t data_size = size;