summaryrefslogtreecommitdiff
path: root/src/inventorymanager.h
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-07-19 02:27:12 +0200
committerest31 <MTest31@outlook.com>2015-07-19 06:23:41 +0200
commit7bbb9b066a8cc079512ddd3e6b32475309f49fca (patch)
treeca94144acc44962f1d868eec75ed1bbc48e5558a /src/inventorymanager.h
parent4046f3e302a3394bf376caf543cb643e1562bc5e (diff)
downloadminetest-7bbb9b066a8cc079512ddd3e6b32475309f49fca.tar.gz
minetest-7bbb9b066a8cc079512ddd3e6b32475309f49fca.tar.bz2
minetest-7bbb9b066a8cc079512ddd3e6b32475309f49fca.zip
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
Diffstat (limited to 'src/inventorymanager.h')
-rw-r--r--src/inventorymanager.h16
1 files changed, 8 insertions, 8 deletions
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