IPL Fix & Formatting (#3082)

This commit is contained in:
R.K 2024-05-10 02:42:21 -07:00 committed by GitHub
parent f44edb83a5
commit 3a7cad7f72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 14 deletions

View File

@ -74,7 +74,8 @@ const ipl_libary ipls[] = {
{{"jewel2fake"}},
{{"jewel2fake"}, {"bh1_16_refurb"}},
}, // Jewelry Interior
{"Coroner Morgue Interior",
{
"Coroner Morgue Interior",
{244.9, -1374.7, 39.5},
{{"coroner_int_on"}, {"coronertrash"}},
{{"coroner_int_off"}},

View File

@ -94,7 +94,7 @@ namespace big
ImGui::SeparatorText("GUI_TAB_IPL"_T.data());
static int current_select = 0;
static int last_select = current_select;
static int last_select = -1;
ImGui::SetNextItemWidth(400);
if (ImGui::BeginCombo("##Ipllocation", ipls[current_select].friendly_name))
@ -120,6 +120,9 @@ namespace big
if (current_select != last_select)
{
// Unload previously loaded IPL of the last selection
// 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)
{
for (auto& ipl_name_unload : ipls[last_select].ipl_names)
{
if (STREAMING::IS_IPL_ACTIVE(ipl_name_unload))
@ -133,6 +136,7 @@ namespace big
{
STREAMING::REQUEST_IPL(ipl_name_load);
}
}
// Load new IPLs of the current selection
for (auto& ipl_name : ipls[current_select].ipl_names)