summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockTorch.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-03 22:38:23 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-03 22:38:23 +0200
commit79e9de8d67e5fdf61c1f80794b5a31e6ac80e7a6 (patch)
treed01d458f313b3934e634733d7f05ece32941f940 /src/Blocks/BlockTorch.h
parentImproved torch handler (diff)
downloadcuberite-79e9de8d67e5fdf61c1f80794b5a31e6ac80e7a6.tar
cuberite-79e9de8d67e5fdf61c1f80794b5a31e6ac80e7a6.tar.gz
cuberite-79e9de8d67e5fdf61c1f80794b5a31e6ac80e7a6.tar.bz2
cuberite-79e9de8d67e5fdf61c1f80794b5a31e6ac80e7a6.tar.lz
cuberite-79e9de8d67e5fdf61c1f80794b5a31e6ac80e7a6.tar.xz
cuberite-79e9de8d67e5fdf61c1f80794b5a31e6ac80e7a6.tar.zst
cuberite-79e9de8d67e5fdf61c1f80794b5a31e6ac80e7a6.zip
Diffstat (limited to 'src/Blocks/BlockTorch.h')
-rw-r--r--src/Blocks/BlockTorch.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Blocks/BlockTorch.h b/src/Blocks/BlockTorch.h
index 3070adfd9..e77bbd1b8 100644
--- a/src/Blocks/BlockTorch.h
+++ b/src/Blocks/BlockTorch.h
@@ -37,6 +37,7 @@ public:
a_BlockFace = FindSuitableFace(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ); // Set a_BlockFace to a valid direction which will be converted later to a metadata
if (a_BlockFace == BLOCK_FACE_NONE)
{
+ // No attachable face found - don't place the torch
return false;
}
}
@@ -116,7 +117,7 @@ public:
{
if (cBlockInfo::FullyOccupiesVoxel(a_BlockType))
{
- // Torches can be placed on full blocks unless their bottom side is clicked
+ // Torches can be placed on all sides of full blocks except the bottom
return (a_BlockFace != BLOCK_FACE_YM);
}
return false;
@@ -125,7 +126,7 @@ public:
}
- /// Finds a suitable face to place the torch, returning BLOCK_FACE_NONE on failure
+ /** Finds a suitable face to place the torch, returning BLOCK_FACE_NONE on failure */
static eBlockFace FindSuitableFace(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ)
{
for (int i = BLOCK_FACE_YM; i <= BLOCK_FACE_XP; i++) // Loop through all directions