Some fixes
This commit is contained in:
parent
545d6458c8
commit
75dda8062a
@ -99,13 +99,13 @@ namespace Components
|
|||||||
|
|
||||||
void FileSystem::RegisterFolder(const char* folder)
|
void FileSystem::RegisterFolder(const char* folder)
|
||||||
{
|
{
|
||||||
const char* fs_cdpath = Dvar::Var("fs_cdpath").Get<const char*>();
|
std::string fs_cdpath = Dvar::Var("fs_cdpath").Get<std::string>();
|
||||||
const char* fs_basepath = Dvar::Var("fs_basepath").Get<const char*>();
|
std::string fs_basepath = Dvar::Var("fs_basepath").Get<std::string>();
|
||||||
const char* fs_homepath = Dvar::Var("fs_homepath").Get<const char*>();
|
std::string fs_homepath = Dvar::Var("fs_homepath").Get<std::string>();
|
||||||
|
|
||||||
if (fs_cdpath) Game::FS_AddLocalizedGameDirectory(fs_cdpath, folder);
|
if (!fs_cdpath.empty()) Game::FS_AddLocalizedGameDirectory(fs_cdpath.data(), folder);
|
||||||
if (fs_basepath) Game::FS_AddLocalizedGameDirectory(fs_basepath, folder);
|
if (!fs_basepath.empty()) Game::FS_AddLocalizedGameDirectory(fs_basepath.data(), folder);
|
||||||
if (fs_homepath) Game::FS_AddLocalizedGameDirectory(fs_homepath, folder);
|
if (!fs_homepath.empty()) Game::FS_AddLocalizedGameDirectory(fs_homepath.data(), folder);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileSystem::RegisterFolders()
|
void FileSystem::RegisterFolders()
|
||||||
|
@ -552,6 +552,14 @@ namespace Components
|
|||||||
|
|
||||||
auto assets = ZoneBuilder::EndAssetTrace();
|
auto assets = ZoneBuilder::EndAssetTrace();
|
||||||
|
|
||||||
|
Logger::Print("Unloading zone '%s'...\n", zone.data());
|
||||||
|
info.freeFlags = info.allocFlags;
|
||||||
|
info.allocFlags = 0;
|
||||||
|
info.name = nullptr;
|
||||||
|
|
||||||
|
Game::DB_LoadXAssets(&info, 1, true);
|
||||||
|
AssetHandler::FindOriginalAsset(Game::XAssetType::ASSET_TYPE_RAWFILE, "default"); // Lock until zone is unloaded
|
||||||
|
|
||||||
Logger::Print("Zone '%s' loaded with %d assets:\n", zone.data(), assets.size());
|
Logger::Print("Zone '%s' loaded with %d assets:\n", zone.data(), assets.size());
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user