1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 16:15:20 +02:00

Fix some common SAO methods to not generate useless update packets

This commit is contained in:
sfan5
2024-02-29 14:56:13 +01:00
parent 585ca90ae0
commit c524c52baa
11 changed files with 160 additions and 85 deletions

View File

@@ -601,8 +601,10 @@ ItemStack InventoryList::changeItem(u32 i, const ItemStack &newitem)
return newitem;
ItemStack olditem = m_items[i];
m_items[i] = newitem;
setModified();
if (olditem != newitem) {
m_items[i] = newitem;
setModified();
}
return olditem;
}