summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
authortonibm19 <tonibm19@gmail.com>2014-02-17 17:01:22 +0100
committertonibm19 <tonibm19@gmail.com>2014-02-17 17:01:22 +0100
commit8707f7ddc812037f022e46fa7d0d6a56a9c55728 (patch)
tree3af800986fc21c2077b79b05d591ffb8c7dc3c11 /src/Mobs
parentNow mobs can't escape from fences. (diff)
downloadcuberite-8707f7ddc812037f022e46fa7d0d6a56a9c55728.tar
cuberite-8707f7ddc812037f022e46fa7d0d6a56a9c55728.tar.gz
cuberite-8707f7ddc812037f022e46fa7d0d6a56a9c55728.tar.bz2
cuberite-8707f7ddc812037f022e46fa7d0d6a56a9c55728.tar.lz
cuberite-8707f7ddc812037f022e46fa7d0d6a56a9c55728.tar.xz
cuberite-8707f7ddc812037f022e46fa7d0d6a56a9c55728.tar.zst
cuberite-8707f7ddc812037f022e46fa7d0d6a56a9c55728.zip
Diffstat (limited to '')
-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 1690d3a31..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) && BlockAtY!=E_BLOCK_FENCE && BlockAtY!=E_BLOCK_FENCE_GATE)
+ 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) && BlockAtY!=E_BLOCK_FENCE && BlockAtY!=E_BLOCK_FENCE_GATE)
+ 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));
}