From 7bbb9b066a8cc079512ddd3e6b32475309f49fca Mon Sep 17 00:00:00 2001 From: est31 Date: Sun, 19 Jul 2015 02:27:12 +0200 Subject: MoveItemSomewhere double bugfix -> Fix bug where MoveSomewhere from an infinite source would fill the destination inventory with copies of itself. -> Fix bug where MoveSomewhere would needlessly call callbacks. -> Remove trailing whitespaces --- src/inventorymanager.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/inventorymanager.h') diff --git a/src/inventorymanager.h b/src/inventorymanager.h index bbeb5117c..35fcf4b99 100644 --- a/src/inventorymanager.h +++ b/src/inventorymanager.h @@ -108,7 +108,7 @@ class InventoryManager public: InventoryManager(){} virtual ~InventoryManager(){} - + // 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) @@ -124,7 +124,7 @@ public: struct InventoryAction { static InventoryAction * deSerialize(std::istream &is); - + virtual u16 getType() const = 0; virtual void serialize(std::ostream &os) const = 0; virtual void apply(InventoryManager *mgr, ServerActiveObject *player, @@ -149,7 +149,7 @@ struct IMoveAction : public InventoryAction // related to movement to somewhere bool caused_by_move_somewhere; u32 move_count; - + IMoveAction() { count = 0; @@ -159,7 +159,7 @@ struct IMoveAction : public InventoryAction caused_by_move_somewhere = false; move_count = 0; } - + IMoveAction(std::istream &is, bool somewhere); u16 getType() const @@ -195,13 +195,13 @@ struct IDropAction : public InventoryAction InventoryLocation from_inv; std::string from_list; s16 from_i; - + IDropAction() { count = 0; from_i = -1; } - + IDropAction(std::istream &is); u16 getType() const @@ -228,12 +228,12 @@ struct ICraftAction : public InventoryAction // count=0 means "everything" u16 count; InventoryLocation craft_inv; - + ICraftAction() { count = 0; } - + ICraftAction(std::istream &is); u16 getType() const -- cgit v1.2.3