diff options
author | worktycho <work.tycho@gmail.com> | 2014-07-13 16:01:49 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-07-13 17:03:14 +0200 |
commit | e1a561286a47ab52f4402ae9d08f143d26c60402 (patch) | |
tree | eb9f5ffa4b933cc1c6c117e00d96a6321b6670fd /src | |
parent | Fixed MSVC warnings in SoundEffect functions. (diff) | |
download | cuberite-e1a561286a47ab52f4402ae9d08f143d26c60402.tar cuberite-e1a561286a47ab52f4402ae9d08f143d26c60402.tar.gz cuberite-e1a561286a47ab52f4402ae9d08f143d26c60402.tar.bz2 cuberite-e1a561286a47ab52f4402ae9d08f143d26c60402.tar.lz cuberite-e1a561286a47ab52f4402ae9d08f143d26c60402.tar.xz cuberite-e1a561286a47ab52f4402ae9d08f143d26c60402.tar.zst cuberite-e1a561286a47ab52f4402ae9d08f143d26c60402.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/BlockEntities/HopperEntity.cpp | 14 |
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; } |