diff --git a/src/Components/Modules/AssetInterfaces/IMaterial.cpp b/src/Components/Modules/AssetInterfaces/IMaterial.cpp index 886258bc..89abca3d 100644 --- a/src/Components/Modules/AssetInterfaces/IMaterial.cpp +++ b/src/Components/Modules/AssetInterfaces/IMaterial.cpp @@ -41,13 +41,12 @@ namespace Assets {"wc_unlit_falloff_add", "wc_unlit_falloff_add_lin_ua"}, {"wc_unlit", "wc_unlit_replace_lin"}, {"wc_unlit_alphatest", "wc_unlit_blend_lin"}, - {"wc_unlit_multiply_lin", "wc_unlit_multiply_lin"}, {"wc_unlit_blend", "wc_unlit_blend_lin_ua"}, {"wc_unlit_replace", "wc_unlit_replace_lin"}, {"mc_unlit_replace", "mc_unlit_replace_lin"}, {"mc_unlit_nofog", "mc_unlit_blend_nofog_ua"}, - {"mc_unlit", "mc_unlit_blend_lin"}, + {"mc_unlit", "mc_unlit_replace_lin_nocast"}, {"mc_unlit_alphatest", "mc_unlit_blend_lin"} /*, {"", ""}, @@ -196,7 +195,7 @@ namespace Assets std::memcpy(asset->stateBitsEntry, header.material->stateBitsEntry, 48); asset->constantCount = header.material->constantCount; asset->constantTable = header.material->constantTable; - + Components::Logger::Print("For %s, copied constants & statebits from %s\n", asset->info.name, header.material->info.name); replacementFound = true; } } diff --git a/src/Components/Modules/AssetInterfaces/IXModel.cpp b/src/Components/Modules/AssetInterfaces/IXModel.cpp index cdcee206..6f27ab5a 100644 --- a/src/Components/Modules/AssetInterfaces/IXModel.cpp +++ b/src/Components/Modules/AssetInterfaces/IXModel.cpp @@ -84,13 +84,14 @@ namespace Assets void IXModel::load(Game::XAssetHeader* header, const std::string& name, Components::ZoneBuilder::Zone* builder) { - if (!builder->isPrimaryAsset()) + Components::FileSystem::File modelFile(Utils::String::VA("xmodel/%s.iw4xModel", name.data())); + + if (!builder->isPrimaryAsset() && (!Components::ZoneBuilder::PreferDiskAssetsDvar.get() || !modelFile.exists())) { header->model = Components::AssetHandler::FindOriginalAsset(this->getType(), name.data()).model; if (header->model) return; } - Components::FileSystem::File modelFile(Utils::String::VA("xmodel/%s.iw4xModel", name.data())); if (modelFile.exists()) { diff --git a/src/Components/Modules/Maps.cpp b/src/Components/Modules/Maps.cpp index 24ee1d5f..012b1d41 100644 --- a/src/Components/Modules/Maps.cpp +++ b/src/Components/Modules/Maps.cpp @@ -771,7 +771,7 @@ namespace Components Maps::AddDlc({ 6, "Freighter", {"mp_cargoship_sh"} }); Maps::AddDlc({ 7, "Resurrection Pack", {"mp_shipment_long", "mp_rust_long", "mp_firingrange"} }); Maps::AddDlc({ 8, "Recycled Pack", {"mp_bloc_sh", "mp_crash_tropical", "mp_estate_tropical", "mp_fav_tropical", "mp_storm_spring"} }); - Maps::AddDlc({ 9, "Classics Pack #3", {"mp_farm", "mp_backlot", "mp_pipeline", "mp_countdown", "mp_crash_snow"} }); + Maps::AddDlc({ 9, "Classics Pack #3", {"mp_farm", "mp_backlot", "mp_pipeline", "mp_countdown", "mp_crash_snow", "mp_carentan"}}); Maps::UpdateDlcStatus(); diff --git a/src/Components/Modules/ZoneBuilder.cpp b/src/Components/Modules/ZoneBuilder.cpp index be9004f5..efff6316 100644 --- a/src/Components/Modules/ZoneBuilder.cpp +++ b/src/Components/Modules/ZoneBuilder.cpp @@ -10,6 +10,8 @@ namespace Components bool ZoneBuilder::Terminate; std::thread ZoneBuilder::CommandThread; + Dvar::Var ZoneBuilder::PreferDiskAssetsDvar; + ZoneBuilder::Zone::Zone(const std::string& name) : indexStart(0), externalSize(0), // Reserve 100MB by default. @@ -1522,6 +1524,8 @@ namespace Components Logger::Print("%s\n", json11::Json(images).dump().data()); Logger::Print("------------------- END IWI DUMP -------------------\n"); }); + + ZoneBuilder::PreferDiskAssetsDvar = Dvar::Register("zb_prefer_disk_assets", false, Game::DVAR_FLAG_NONE, "Should zonebuilder prefer in-memory assets (requirements) or disk assets, when both are present?"); } } diff --git a/src/Components/Modules/ZoneBuilder.hpp b/src/Components/Modules/ZoneBuilder.hpp index 8b0c12f0..5c647816 100644 --- a/src/Components/Modules/ZoneBuilder.hpp +++ b/src/Components/Modules/ZoneBuilder.hpp @@ -130,6 +130,7 @@ namespace Components static std::vector> EndAssetTrace(); static Game::XAssetHeader GetEmptyAssetIfCommon(Game::XAssetType type, const std::string& name, Zone* builder); + static Dvar::Var PreferDiskAssetsDvar; private: static int StoreTexture(Game::GfxImageLoadDef **loadDef, Game::GfxImage *image);