diff options
Diffstat (limited to 'source/Blocks/BlockTorch.h')
-rw-r--r-- | source/Blocks/BlockTorch.h | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/source/Blocks/BlockTorch.h b/source/Blocks/BlockTorch.h index c94c4c436..99c1a7b75 100644 --- a/source/Blocks/BlockTorch.h +++ b/source/Blocks/BlockTorch.h @@ -109,21 +109,11 @@ public: static bool CanBePlacedOn(BLOCKTYPE a_BlockType, char a_Direction) { - switch (a_BlockType) - { - case E_BLOCK_GLASS: - case E_BLOCK_FENCE: - case E_BLOCK_NETHER_BRICK_FENCE: - case E_BLOCK_PISTON: - case E_BLOCK_WORKBENCH: - { - return (a_Direction == 0x1); // allow only direction "standing on floor" - } - - default: - { - return g_BlockIsSolid[a_BlockType]; - } + if ( g_BlockIsSolid[a_BlockType] ) { + return (a_Direction == 0x1); // allow only direction "standing on floor" + } + else { + return g_BlockIsSolid[a_BlockType]; } } |