diff --git a/Crawler/InventoryScrollableWindowComponent.h b/Crawler/InventoryScrollableWindowComponent.h index abbccd67..14e761ef 100644 --- a/Crawler/InventoryScrollableWindowComponent.h +++ b/Crawler/InventoryScrollableWindowComponent.h @@ -105,20 +105,18 @@ protected: MenuFunc useItemFunc=[&](MenuFuncData data){ MenuItemButton*button=(MenuItemButton*)data.component; - if(!data.game->GetLoadoutItem(data.menu.I(A::LOADOUT_SLOT)).IsBlank()){ //This loadout slot seems to have an item in it already, so deselect that one first. - data.game->ClearLoadoutItem(data.menu.I(A::LOADOUT_SLOT)); - for(MenuComponent*component:components){ - if(component->GetName().starts_with("item")){ - MenuItemButton*button2=(MenuItemButton*)component;//HACK ALERT! This is probably an item since we populated item lists using this name for the components. So we assume these are MenuItemButton classes. - if(button2==button){ - if(button2->selected!=-1){ - data.game->ClearLoadoutItem(button2->selected); - } - button2->selected=-1; - } - if(button2->selected==data.menu.I(A::LOADOUT_SLOT)){ - button2->selected=-1; + data.game->ClearLoadoutItem(data.menu.I(A::LOADOUT_SLOT)); + for(MenuComponent*component:components){ + if(component->GetName().starts_with("item")){ + MenuItemButton*button2=(MenuItemButton*)component;//HACK ALERT! This is probably an item since we populated item lists using this name for the components. So we assume these are MenuItemButton classes. + if(button2==button){ + if(button2->selected!=-1){ + data.game->ClearLoadoutItem(button2->selected); } + button2->selected=-1; + } + if(button2->selected==data.menu.I(A::LOADOUT_SLOT)){ + button2->selected=-1; } } } diff --git a/Crawler/Version.h b/Crawler/Version.h index 8c771630..0c310f41 100644 --- a/Crawler/Version.h +++ b/Crawler/Version.h @@ -33,7 +33,7 @@ SUCH DAMAGE. #define VERSION_MAJOR 0 #define VERSION_MINOR 2 #define VERSION_PATCH 1 -#define VERSION_BUILD 2854 +#define VERSION_BUILD 2856 #define stringify(a) stringify_(a) #define stringify_(a) #a