summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2014-02-17 17:12:59 +0100
committerAlexander Harkness <bearbin@gmail.com>2014-02-17 17:12:59 +0100
commit72d312ac9b1db6cc7db1cde2104a2f14151f4620 (patch)
tree143c8c1e5013446d0e2b9c0e8153120171e555c7 /src
parentMerge pull request #688 from worktycho/Flags (diff)
parentImproved formatting (diff)
downloadcuberite-72d312ac9b1db6cc7db1cde2104a2f14151f4620.tar
cuberite-72d312ac9b1db6cc7db1cde2104a2f14151f4620.tar.gz
cuberite-72d312ac9b1db6cc7db1cde2104a2f14151f4620.tar.bz2
cuberite-72d312ac9b1db6cc7db1cde2104a2f14151f4620.tar.lz
cuberite-72d312ac9b1db6cc7db1cde2104a2f14151f4620.tar.xz
cuberite-72d312ac9b1db6cc7db1cde2104a2f14151f4620.tar.zst
cuberite-72d312ac9b1db6cc7db1cde2104a2f14151f4620.zip
Diffstat (limited to 'src')
-rw-r--r--src/Mobs/Monster.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index 9817901c9..b5cf693cb 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -142,11 +142,11 @@ void cMonster::TickPathFinding()
BLOCKTYPE BlockAtYPP = m_World->GetBlock(gCrossCoords[i].x + PosX, PosY + 2, gCrossCoords[i].z + PosZ);
BLOCKTYPE BlockAtYM = m_World->GetBlock(gCrossCoords[i].x + PosX, PosY - 1, gCrossCoords[i].z + PosZ);
- if (!g_BlockIsSolid[BlockAtY] && !g_BlockIsSolid[BlockAtYP] && !IsBlockLava(BlockAtYM))
+ if ((!g_BlockIsSolid[BlockAtY]) && (!g_BlockIsSolid[BlockAtYP]) && (!IsBlockLava(BlockAtYM)) && (BlockAtY != E_BLOCK_FENCE) && (BlockAtY != E_BLOCK_FENCE_GATE))
{
m_PotentialCoordinates.push_back(Vector3d((gCrossCoords[i].x + PosX), PosY, gCrossCoords[i].z + PosZ));
}
- else if (g_BlockIsSolid[BlockAtY] && !g_BlockIsSolid[BlockAtYP] && !g_BlockIsSolid[BlockAtYPP] && !IsBlockLava(BlockAtYM))
+ else if ((g_BlockIsSolid[BlockAtY]) && (!g_BlockIsSolid[BlockAtYP]) && (!g_BlockIsSolid[BlockAtYPP]) && (!IsBlockLava(BlockAtYM)) && (BlockAtY != E_BLOCK_FENCE) && (BlockAtY != E_BLOCK_FENCE_GATE))
{
m_PotentialCoordinates.push_back(Vector3d((gCrossCoords[i].x + PosX), PosY + 1, gCrossCoords[i].z + PosZ));
}