summaryrefslogtreecommitdiffstats
path: root/src/Entities/Pickup.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-06-26 17:20:48 +0200
committerHowaner <franzi.moos@googlemail.com>2014-06-26 17:20:48 +0200
commitcba273dc7e381c00b214fa0806679170f4e4e2f3 (patch)
tree7a4ab2db1432a3cfe0010710c6fdccd513d66e17 /src/Entities/Pickup.cpp
parentMerge branch 'master' into Pickups (diff)
downloadcuberite-cba273dc7e381c00b214fa0806679170f4e4e2f3.tar
cuberite-cba273dc7e381c00b214fa0806679170f4e4e2f3.tar.gz
cuberite-cba273dc7e381c00b214fa0806679170f4e4e2f3.tar.bz2
cuberite-cba273dc7e381c00b214fa0806679170f4e4e2f3.tar.lz
cuberite-cba273dc7e381c00b214fa0806679170f4e4e2f3.tar.xz
cuberite-cba273dc7e381c00b214fa0806679170f4e4e2f3.tar.zst
cuberite-cba273dc7e381c00b214fa0806679170f4e4e2f3.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Pickup.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp
index 44a65412f..969461a6a 100644
--- a/src/Entities/Pickup.cpp
+++ b/src/Entities/Pickup.cpp
@@ -41,7 +41,7 @@ public:
cItem & Item = ((cPickup *)a_Entity)->GetItem();
if ((Distance < 1.2) && Item.IsEqual(m_Pickup->GetItem()))
{
- char CombineCount = Item.m_ItemCount;
+ short CombineCount = Item.m_ItemCount;
if ((CombineCount + m_Pickup->GetItem().m_ItemCount) > Item.GetMaxStackSize())
{
CombineCount = Item.GetMaxStackSize() - m_Pickup->GetItem().m_ItemCount;
@@ -150,7 +150,7 @@ void cPickup::Tick(float a_Dt, cChunk & a_Chunk)
}
}
- if (!IsDestroyed() && (m_Item.m_ItemCount < m_Item.GetMaxStackSize())) // Don't try to combine if someone has tried to combine me
+ if (!IsDestroyed() && (m_Item.m_ItemCount < m_Item.GetMaxStackSize())) // Don't combine into an already full pickup
{
cPickupCombiningCallback PickupCombiningCallback(GetPosition(), this);
m_World->ForEachEntity(PickupCombiningCallback); // Not ForEachEntityInChunk, otherwise pickups don't combine across chunk boundaries