diff options
author | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-17 16:33:51 +0200 |
---|---|---|
committer | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-17 16:33:51 +0200 |
commit | aaf772f68a11d1deb7897a0cd09c25cda2fd149d (patch) | |
tree | c929cccc33810cf1d953c0ba75d7e31202e03f1e /source/items/Item.cpp | |
parent | Simple health regeneration system (diff) | |
download | cuberite-aaf772f68a11d1deb7897a0cd09c25cda2fd149d.tar cuberite-aaf772f68a11d1deb7897a0cd09c25cda2fd149d.tar.gz cuberite-aaf772f68a11d1deb7897a0cd09c25cda2fd149d.tar.bz2 cuberite-aaf772f68a11d1deb7897a0cd09c25cda2fd149d.tar.lz cuberite-aaf772f68a11d1deb7897a0cd09c25cda2fd149d.tar.xz cuberite-aaf772f68a11d1deb7897a0cd09c25cda2fd149d.tar.zst cuberite-aaf772f68a11d1deb7897a0cd09c25cda2fd149d.zip |
Diffstat (limited to 'source/items/Item.cpp')
-rw-r--r-- | source/items/Item.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/items/Item.cpp b/source/items/Item.cpp index ce72cf8b3..2596548d6 100644 --- a/source/items/Item.cpp +++ b/source/items/Item.cpp @@ -237,7 +237,10 @@ void cItemHandler::PlaceBlock(cWorld *a_World, cPlayer *a_Player, cItem *a_Item, cBlockHandler *Handler = cBlockHandler::GetBlockHandler(Block);
Handler->PlaceBlock(a_World, a_Player, GetBlockMeta(a_Item->m_ItemHealth), a_X, a_Y, a_Z, a_Dir);
if(a_Player->GetGameMode() == eGameMode_Survival)
- a_Player->GetInventory().RemoveItem(cItem(a_Item->m_ItemID, 1));
+ {
+ cItem Item(a_Item->m_ItemID, 1);
+ a_Player->GetInventory().RemoveItem(Item);
+ }
}
bool cItemHandler::EatItem(cPlayer *a_Player, cItem *a_Item)
|