mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Inventory: Properly revert client predictions (#8945)
Caused by incremental inventory sending Previously everything was overwritten by serializing the entire inventory
This commit is contained in:
parent
05a7da6279
commit
94a5df795c
3 changed files with 25 additions and 11 deletions
|
@ -323,11 +323,14 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
inline void setModified(bool dirty)
|
||||
inline void setModified(bool dirty = true)
|
||||
{
|
||||
m_dirty = dirty;
|
||||
for (const auto &list : m_lists)
|
||||
list->setModified(dirty);
|
||||
// Set all as handled
|
||||
if (!dirty) {
|
||||
for (const auto &list : m_lists)
|
||||
list->setModified(dirty);
|
||||
}
|
||||
}
|
||||
private:
|
||||
// -1 if not found
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue