From 7851c4f7a2673477cf80a38842d77efbe5a0a915 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Tue, 24 Mar 2015 09:36:54 +0100 Subject: Don't send an InventoryAction at each setInventoryModified, we only need one SendInventory per inventory modification Client doesn't like to receive multiples SendInventory for one action, this can trigger glitches on clients (sometimes due to incorrect UDP packet ordering due to UDP protocol) This fix issue #2544 --- src/inventorymanager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/inventorymanager.h') diff --git a/src/inventorymanager.h b/src/inventorymanager.h index 8e2abc961..39cc6e50f 100644 --- a/src/inventorymanager.h +++ b/src/inventorymanager.h @@ -112,7 +112,7 @@ public: // Get an inventory (server and client) virtual Inventory* getInventory(const InventoryLocation &loc){return NULL;} // Set modified (will be saved and sent over network; only on server) - virtual void setInventoryModified(const InventoryLocation &loc){} + virtual void setInventoryModified(const InventoryLocation &loc, bool playerSend = true){} // Send inventory action to server (only on client) virtual void inventoryAction(InventoryAction *a){} }; -- cgit v1.2.3