summaryrefslogtreecommitdiffstats
path: root/source/Blocks/BlockRail.h
diff options
context:
space:
mode:
authorluksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-26 11:03:34 +0100
committerluksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-26 11:03:34 +0100
commiteb7131bd126b06c348313de6ab07d5d59f7c79c0 (patch)
tree87516638a71e7105b318fd17c15b2be143f622c0 /source/Blocks/BlockRail.h
parentCryptoPP patches from xcb567 (diff)
downloadcuberite-eb7131bd126b06c348313de6ab07d5d59f7c79c0.tar
cuberite-eb7131bd126b06c348313de6ab07d5d59f7c79c0.tar.gz
cuberite-eb7131bd126b06c348313de6ab07d5d59f7c79c0.tar.bz2
cuberite-eb7131bd126b06c348313de6ab07d5d59f7c79c0.tar.lz
cuberite-eb7131bd126b06c348313de6ab07d5d59f7c79c0.tar.xz
cuberite-eb7131bd126b06c348313de6ab07d5d59f7c79c0.tar.zst
cuberite-eb7131bd126b06c348313de6ab07d5d59f7c79c0.zip
Diffstat (limited to 'source/Blocks/BlockRail.h')
-rw-r--r--source/Blocks/BlockRail.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/Blocks/BlockRail.h b/source/Blocks/BlockRail.h
index fb2000884..24947c0bc 100644
--- a/source/Blocks/BlockRail.h
+++ b/source/Blocks/BlockRail.h
@@ -58,7 +58,8 @@ public:
virtual void OnNeighborChanged(cWorld *a_World, int a_BlockX, int a_BlockY, int a_BlockZ) override
{
- if(IsUnstable(a_World, a_BlockX, a_BlockY, a_BlockZ))
+ char Meta = a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
+ if(IsUnstable(a_World, a_BlockX, a_BlockY, a_BlockZ) && Meta != FindMeta(a_World, a_BlockX, a_BlockY, a_BlockZ))
a_World->FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, m_BlockType, FindMeta(a_World, a_BlockX, a_BlockY, a_BlockZ));
}