summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-07-14 16:29:56 +0200
committerMattes D <github@xoft.cz>2014-07-14 16:29:56 +0200
commita4d9ccded404201c90bd41cab189dd824653da34 (patch)
treeeb0c3eccddb0041f2779b2c3602735764e43e054
parentMerge pull request #1172 from mc-server/coverity_fixes (diff)
parentMerge branch 'master' into ChestFix (diff)
downloadcuberite-a4d9ccded404201c90bd41cab189dd824653da34.tar
cuberite-a4d9ccded404201c90bd41cab189dd824653da34.tar.gz
cuberite-a4d9ccded404201c90bd41cab189dd824653da34.tar.bz2
cuberite-a4d9ccded404201c90bd41cab189dd824653da34.tar.lz
cuberite-a4d9ccded404201c90bd41cab189dd824653da34.tar.xz
cuberite-a4d9ccded404201c90bd41cab189dd824653da34.tar.zst
cuberite-a4d9ccded404201c90bd41cab189dd824653da34.zip
-rw-r--r--src/BlockEntities/HopperEntity.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/BlockEntities/HopperEntity.cpp b/src/BlockEntities/HopperEntity.cpp
index aaf82d150..7af4b9d5d 100644
--- a/src/BlockEntities/HopperEntity.cpp
+++ b/src/BlockEntities/HopperEntity.cpp
@@ -368,13 +368,13 @@ bool cHopperEntity::MoveItemsOut(cChunk & a_Chunk, Int64 a_CurrentTick)
/// Moves items from a chest (dblchest) above the hopper into this hopper. Returns true if contents have changed.
bool cHopperEntity::MoveItemsFromChest(cChunk & a_Chunk)
{
- cChestEntity * Chest = (cChestEntity *)a_Chunk.GetBlockEntity(m_PosX, m_PosY + 1, m_PosZ);
- if (Chest == NULL)
+ cChestEntity * MainChest = (cChestEntity *)a_Chunk.GetBlockEntity(m_PosX, m_PosY + 1, m_PosZ);
+ if (MainChest == NULL)
{
LOGWARNING("%s: A chest entity was not found where expected, at {%d, %d, %d}", __FUNCTION__, m_PosX, m_PosY + 1, m_PosZ);
return false;
}
- if (MoveItemsFromGrid(*Chest))
+ if (MoveItemsFromGrid(*MainChest))
{
// Moved the item from the chest directly above the hopper
return true;
@@ -403,20 +403,20 @@ bool cHopperEntity::MoveItemsFromChest(cChunk & a_Chunk)
}
BLOCKTYPE Block = Neighbor->GetBlock(x, m_PosY + 1, z);
- if (Block != Chest->GetBlockType())
+ if (Block != MainChest->GetBlockType())
{
// Not the same kind of chest
continue;
}
- Chest = (cChestEntity *)Neighbor->GetBlockEntity(m_PosX + Coords[i].x, m_PosY + 1, m_PosZ + Coords[i].z);
- if (Chest == NULL)
+ cChestEntity * SideChest = (cChestEntity *)Neighbor->GetBlockEntity(m_PosX + Coords[i].x, m_PosY + 1, m_PosZ + Coords[i].z);
+ if (SideChest == NULL)
{
LOGWARNING("%s: A chest entity was not found where expected, at {%d, %d, %d}", __FUNCTION__, m_PosX + Coords[i].x, m_PosY + 1, m_PosZ + Coords[i].z);
}
else
{
- if (MoveItemsFromGrid(*Chest))
+ if (MoveItemsFromGrid(*SideChest))
{
return true;
}