summaryrefslogtreecommitdiffstats
path: root/source/Blocks/BlockVine.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/Blocks/BlockVine.h')
-rw-r--r--source/Blocks/BlockVine.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/Blocks/BlockVine.h b/source/Blocks/BlockVine.h
index b71997f2a..cdef18520 100644
--- a/source/Blocks/BlockVine.h
+++ b/source/Blocks/BlockVine.h
@@ -35,10 +35,12 @@ public:
return true;
}
- if (g_BlockIsSolid[a_World->GetBlock( a_BlockX, a_BlockY + 1, a_BlockZ )])
+ BLOCKTYPE TopBlock = a_World->GetBlock( a_BlockX, a_BlockY + 1, a_BlockZ);
+ if (g_BlockIsSolid[TopBlock] || TopBlock==E_BLOCK_LEAVES)
{
AddDirection( a_BlockX, a_BlockY, a_BlockZ, a_Dir, true );
- if (g_BlockIsSolid[a_World->GetBlock( a_BlockX, a_BlockY, a_BlockZ )]==false)
+ BLOCKTYPE BaseBlock = a_World->GetBlock( a_BlockX, a_BlockY, a_BlockZ);
+ if (g_BlockIsSolid[BaseBlock] == false && BaseBlock!=E_BLOCK_LEAVES)
{
AddDirection( a_BlockX, a_BlockY, a_BlockZ, a_Dir, false );
a_World->SetBlock( a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_VINES, 0);
@@ -47,8 +49,8 @@ public:
}
AddDirection( a_BlockX, a_BlockY, a_BlockZ, a_Dir, true );
-
- return g_BlockIsSolid[a_World->GetBlock( a_BlockX, a_BlockY, a_BlockZ)];
+ BLOCKTYPE BaseBlock = a_World->GetBlock( a_BlockX, a_BlockY, a_BlockZ);
+ return g_BlockIsSolid[BaseBlock] || BaseBlock==E_BLOCK_LEAVES;
}