diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-06-27 00:24:51 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-12-18 14:17:38 +0100 |
commit | 5b62c4c3145c08b093521e42c565922fa85de4ad (patch) | |
tree | dca8cbfe86aa27af174da21f6835a8fbbe83d248 /src/Blocks/BlockRail.h | |
parent | Merge pull request #2770 from cuberite/RemoveChunkDataCollector (diff) | |
download | cuberite-5b62c4c3145c08b093521e42c565922fa85de4ad.tar cuberite-5b62c4c3145c08b093521e42c565922fa85de4ad.tar.gz cuberite-5b62c4c3145c08b093521e42c565922fa85de4ad.tar.bz2 cuberite-5b62c4c3145c08b093521e42c565922fa85de4ad.tar.lz cuberite-5b62c4c3145c08b093521e42c565922fa85de4ad.tar.xz cuberite-5b62c4c3145c08b093521e42c565922fa85de4ad.tar.zst cuberite-5b62c4c3145c08b093521e42c565922fa85de4ad.zip |
Diffstat (limited to 'src/Blocks/BlockRail.h')
-rw-r--r-- | src/Blocks/BlockRail.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Blocks/BlockRail.h b/src/Blocks/BlockRail.h index b603bb1a7..734ee93c7 100644 --- a/src/Blocks/BlockRail.h +++ b/src/Blocks/BlockRail.h @@ -73,10 +73,11 @@ public: virtual void OnNeighborChanged(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_WhichNeighbor) override { - NIBBLETYPE Meta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ); - if (IsUnstable(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ) && (Meta != FindMeta(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ))) + auto Meta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ); + auto NewMeta = FindMeta(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ); + if (IsUnstable(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ) && (Meta != NewMeta)) { - a_ChunkInterface.FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, m_BlockType, FindMeta(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ)); + a_ChunkInterface.FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, m_BlockType, (m_BlockType == E_BLOCK_RAIL) ? NewMeta : NewMeta | (Meta & 0x08)); } } |