mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-05-13 16:31:21 +00:00
DataSpec: Fix MREA mesh visor flags when cooking
This commit is contained in:
parent
9e5f28ba80
commit
ad6cabed7b
@ -358,21 +358,21 @@ void MREA::Name(const SpecBase& dataSpec, PAKEntryReadStream& rs, PAKRouter<PAKB
|
|||||||
|
|
||||||
void MREA::MeshHeader::VisorFlags::setFromBlenderProps(const std::unordered_map<std::string, std::string>& props) {
|
void MREA::MeshHeader::VisorFlags::setFromBlenderProps(const std::unordered_map<std::string, std::string>& props) {
|
||||||
auto search = props.find("retro_disable_enviro_visor");
|
auto search = props.find("retro_disable_enviro_visor");
|
||||||
if (search != props.cend() && search->second == "True")
|
if (search != props.cend() && search->second == "1")
|
||||||
setDisableEnviro(true);
|
setDisableEnviro(true);
|
||||||
search = props.find("retro_disable_thermal_visor");
|
search = props.find("retro_disable_thermal_visor");
|
||||||
if (search != props.cend() && search->second == "True")
|
if (search != props.cend() && search->second == "1")
|
||||||
setDisableThermal(true);
|
setDisableThermal(true);
|
||||||
search = props.find("retro_disable_xray_visor");
|
search = props.find("retro_disable_xray_visor");
|
||||||
if (search != props.cend() && search->second == "True")
|
if (search != props.cend() && search->second == "1")
|
||||||
setDisableXray(true);
|
setDisableXray(true);
|
||||||
search = props.find("retro_thermal_level");
|
search = props.find("retro_thermal_level");
|
||||||
if (search != props.cend()) {
|
if (search != props.cend()) {
|
||||||
if (search->second == "COOL")
|
if (search->second == "0")
|
||||||
setThermalLevel(ThermalLevel::Cool);
|
setThermalLevel(ThermalLevel::Cool);
|
||||||
else if (search->second == "HOT")
|
else if (search->second == "1")
|
||||||
setThermalLevel(ThermalLevel::Hot);
|
setThermalLevel(ThermalLevel::Hot);
|
||||||
else if (search->second == "WARM")
|
else if (search->second == "2")
|
||||||
setThermalLevel(ThermalLevel::Warm);
|
setThermalLevel(ThermalLevel::Warm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1047,7 +1047,7 @@ void CGameArea::FillInStaticGeometry(bool textures) {
|
|||||||
matSet.InitializeLayout(nullptr);
|
matSet.InitializeLayout(nullptr);
|
||||||
++secIt;
|
++secIt;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) {
|
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) {
|
||||||
/* Reserve extra buffers for 16 cubemaps and shadow rendering */
|
/* Reserve extra buffers for 16 cubemaps and shadow rendering */
|
||||||
matSet.m_geomLayout->ReserveSharedBuffers(ctx, 96 + int(EWorldShadowMode::MAX));
|
matSet.m_geomLayout->ReserveSharedBuffers(ctx, 96 + int(EWorldShadowMode::MAX));
|
||||||
@ -1092,7 +1092,7 @@ void CGameArea::FillInStaticGeometry(bool textures) {
|
|||||||
|
|
||||||
TToken<CModel> nullModel;
|
TToken<CModel> nullModel;
|
||||||
inst.m_instance = std::make_unique<CBooModel>(nullModel, nullptr, &inst.m_surfaces, matSet, vbo, ibo,
|
inst.m_instance = std::make_unique<CBooModel>(nullModel, nullptr, &inst.m_surfaces, matSet, vbo, ibo,
|
||||||
inst.x34_aabb, inst.x0_visorFlags, 0);
|
inst.x34_aabb, static_cast<u8>(inst.x0_visorFlags), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user