IPL Fix & Formatting (#3082)
This commit is contained in:
parent
f44edb83a5
commit
3a7cad7f72
@ -74,10 +74,11 @@ const ipl_libary ipls[] = {
|
|||||||
{{"jewel2fake"}},
|
{{"jewel2fake"}},
|
||||||
{{"jewel2fake"}, {"bh1_16_refurb"}},
|
{{"jewel2fake"}, {"bh1_16_refurb"}},
|
||||||
}, // Jewelry Interior
|
}, // Jewelry Interior
|
||||||
{"Coroner Morgue Interior",
|
{
|
||||||
{244.9, -1374.7, 39.5},
|
"Coroner Morgue Interior",
|
||||||
{{"coroner_int_on"}, {"coronertrash"}},
|
{244.9, -1374.7, 39.5},
|
||||||
{{"coroner_int_off"}},
|
{{"coroner_int_on"}, {"coronertrash"}},
|
||||||
{{"coroner_int_off"}},
|
{{"coroner_int_off"}},
|
||||||
|
{{"coroner_int_off"}},
|
||||||
}, // Coroner Morgue Interior
|
}, // Coroner Morgue Interior
|
||||||
};
|
};
|
||||||
|
@ -94,7 +94,7 @@ namespace big
|
|||||||
ImGui::SeparatorText("GUI_TAB_IPL"_T.data());
|
ImGui::SeparatorText("GUI_TAB_IPL"_T.data());
|
||||||
|
|
||||||
static int current_select = 0;
|
static int current_select = 0;
|
||||||
static int last_select = current_select;
|
static int last_select = -1;
|
||||||
|
|
||||||
ImGui::SetNextItemWidth(400);
|
ImGui::SetNextItemWidth(400);
|
||||||
if (ImGui::BeginCombo("##Ipllocation", ipls[current_select].friendly_name))
|
if (ImGui::BeginCombo("##Ipllocation", ipls[current_select].friendly_name))
|
||||||
@ -120,18 +120,22 @@ namespace big
|
|||||||
if (current_select != last_select)
|
if (current_select != last_select)
|
||||||
{
|
{
|
||||||
// Unload previously loaded IPL of the last selection
|
// Unload previously loaded IPL of the last selection
|
||||||
for (auto& ipl_name_unload : ipls[last_select].ipl_names)
|
// If this is our first time loading an IPL (especially the first one in the list, then don't unload anything)
|
||||||
|
if (last_select != -1)
|
||||||
{
|
{
|
||||||
if (STREAMING::IS_IPL_ACTIVE(ipl_name_unload))
|
for (auto& ipl_name_unload : ipls[last_select].ipl_names)
|
||||||
{
|
{
|
||||||
STREAMING::REMOVE_IPL(ipl_name_unload);
|
if (STREAMING::IS_IPL_ACTIVE(ipl_name_unload))
|
||||||
|
{
|
||||||
|
STREAMING::REMOVE_IPL(ipl_name_unload);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Load previously deleted IPLs of the last selection
|
// Load previously deleted IPLs of the last selection
|
||||||
for (auto& ipl_name_load : ipls[last_select].ipl_names_remove)
|
for (auto& ipl_name_load : ipls[last_select].ipl_names_remove)
|
||||||
{
|
{
|
||||||
STREAMING::REQUEST_IPL(ipl_name_load);
|
STREAMING::REQUEST_IPL(ipl_name_load);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load new IPLs of the current selection
|
// Load new IPLs of the current selection
|
||||||
|
Reference in New Issue
Block a user