mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Inventory: Send dirty lists where appropriate (#8742)
This change reduces the amount of sent data towards clients. Inventory lists that are already known to the player are skipped, saving quite some data over time. Raises protocol version to 38 to ensure correct backwards-compatible code.
This commit is contained in:
parent
008b80fe1c
commit
0b4f424f41
16 changed files with 193 additions and 160 deletions
|
@ -110,12 +110,7 @@ public:
|
|||
|
||||
bool checkModified() const { return m_dirty || inventory.checkModified(); }
|
||||
|
||||
void setModified(const bool x)
|
||||
{
|
||||
m_dirty = x;
|
||||
if (!x)
|
||||
inventory.setModified(x);
|
||||
}
|
||||
inline void setModified(const bool x) { m_dirty = x; }
|
||||
|
||||
void setLocalAnimations(v2s32 frames[4], float frame_speed)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue