summaryrefslogtreecommitdiff
path: root/src/remoteplayer.h
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2019-08-24 19:07:38 +0200
committerGitHub <noreply@github.com>2019-08-24 19:07:38 +0200
commit0b4f424f414380b7a46270e1389e8aa0524d8fba (patch)
tree5731cbe72bb3178d697b3cda43b838f26ba34f7d /src/remoteplayer.h
parent008b80fe1ca9d46610b8971e2ac92fb56da8e69f (diff)
downloadminetest-0b4f424f414380b7a46270e1389e8aa0524d8fba.tar.gz
minetest-0b4f424f414380b7a46270e1389e8aa0524d8fba.tar.bz2
minetest-0b4f424f414380b7a46270e1389e8aa0524d8fba.zip
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.
Diffstat (limited to 'src/remoteplayer.h')
-rw-r--r--src/remoteplayer.h7
1 files changed, 1 insertions, 6 deletions
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)
{