From 0f5f266ea5d7897a72a1f86dd199627c90d51f4c Mon Sep 17 00:00:00 2001 From: momo5502 Date: Wed, 3 Feb 2016 21:23:07 +0100 Subject: [PATCH] Correctly unload zones. --- src/Components/Modules/ZoneBuilder.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Components/Modules/ZoneBuilder.cpp b/src/Components/Modules/ZoneBuilder.cpp index ce7d0c30..c9d54f22 100644 --- a/src/Components/Modules/ZoneBuilder.cpp +++ b/src/Components/Modules/ZoneBuilder.cpp @@ -15,6 +15,14 @@ namespace Components ZoneBuilder::Zone::~Zone() { + // Unload our fastfiles + Game::XZoneInfo info; + info.name = nullptr; + info.allocFlags = 0; + info.freeFlags = 0x01000000; + + Game::DB_LoadXAssets(&info, 1, true); + AssetHandler::ClearTemporaryAssets(); Localization::ClearTemp();