diff options
author | luksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-11-15 19:57:47 +0100 |
---|---|---|
committer | luksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-11-15 19:57:47 +0100 |
commit | ea8545dff189312ad1300fddb2f2ead7d5cf1c59 (patch) | |
tree | 2cfa106c110808bce3e927521dc9e67c87c32ba3 /source/Blocks/BlockVine.h | |
parent | More valgrind fixes (diff) | |
download | cuberite-ea8545dff189312ad1300fddb2f2ead7d5cf1c59.tar cuberite-ea8545dff189312ad1300fddb2f2ead7d5cf1c59.tar.gz cuberite-ea8545dff189312ad1300fddb2f2ead7d5cf1c59.tar.bz2 cuberite-ea8545dff189312ad1300fddb2f2ead7d5cf1c59.tar.lz cuberite-ea8545dff189312ad1300fddb2f2ead7d5cf1c59.tar.xz cuberite-ea8545dff189312ad1300fddb2f2ead7d5cf1c59.tar.zst cuberite-ea8545dff189312ad1300fddb2f2ead7d5cf1c59.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Blocks/BlockVine.h | 10 |
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;
}
|