From 0b4f424f414380b7a46270e1389e8aa0524d8fba Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 24 Aug 2019 19:07:38 +0200 Subject: 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. --- src/remoteplayer.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/remoteplayer.h') diff --git a/src/remoteplayer.h b/src/remoteplayer.h index ea118e604..260504fb4 100644 --- a/src/remoteplayer.h +++ b/src/remoteplayer.h @@ -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) { -- cgit v1.2.3