mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 09:25:37 +02:00
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
This commit is contained in:
@@ -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){}
|
||||
};
|
||||
|
Reference in New Issue
Block a user