1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Avoid some inefficiencies when handling ItemStack(Metadata)

This commit is contained in:
sfan5 2024-12-31 01:26:08 +01:00
parent d884a1624f
commit a2058f7f3a
7 changed files with 37 additions and 51 deletions

View file

@ -85,8 +85,8 @@ void GUIInventoryList::draw()
v2s32 p((i % m_geom.X) * m_slot_spacing.X,
(i / m_geom.X) * m_slot_spacing.Y);
core::rect<s32> rect = imgrect + base_pos + p;
ItemStack item = ilist->getItem(item_i);
ItemStack orig_item = item;
const ItemStack &orig_item = ilist->getItem(item_i);
ItemStack item = orig_item;
bool selected = selected_item
&& m_invmgr->getInventory(selected_item->inventoryloc) == inv