possible hud.open bug fix

This commit is contained in:
MihailRis 2025-08-11 23:53:49 +03:00
parent ebb7cd98c5
commit 2783b0af7b
2 changed files with 2 additions and 1 deletions

View File

@ -538,6 +538,7 @@ void Hud::closeInventory() {
exchangeSlotInv = nullptr;
inventoryOpen = false;
inventoryView = nullptr;
secondInvView = nullptr;
secondUI = nullptr;
for (auto& element : elements) {

View File

@ -46,7 +46,7 @@ static int l_open(lua::State* L) {
}
return lua::pushinteger(L, hud->openInventory(
layout,
level->inventories->get(invid),
lua::isnoneornil(L, 3) ? nullptr : level->inventories->get(invid),
playerInventory
)->getId());
}