summaryrefslogtreecommitdiffstats
path: root/source/Blocks/BlockRail.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-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));
}