summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Path.cpp
diff options
context:
space:
mode:
authorwiseoldman95 <softwatt@gmx.com>2015-05-06 05:46:10 +0200
committerwiseoldman95 <softwatt@gmx.com>2015-05-06 06:31:02 +0200
commit020e9286859925c2fe4c18565a70b1b1fce82558 (patch)
tree03b2ca1b8dd3877990c780b8e3f657e383f2527a /src/Mobs/Path.cpp
parentMerge pull request #1939 from SafwatHalaby/Polising (diff)
downloadcuberite-020e9286859925c2fe4c18565a70b1b1fce82558.tar
cuberite-020e9286859925c2fe4c18565a70b1b1fce82558.tar.gz
cuberite-020e9286859925c2fe4c18565a70b1b1fce82558.tar.bz2
cuberite-020e9286859925c2fe4c18565a70b1b1fce82558.tar.lz
cuberite-020e9286859925c2fe4c18565a70b1b1fce82558.tar.xz
cuberite-020e9286859925c2fe4c18565a70b1b1fce82558.tar.zst
cuberite-020e9286859925c2fe4c18565a70b1b1fce82558.zip
Diffstat (limited to 'src/Mobs/Path.cpp')
-rw-r--r--src/Mobs/Path.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Mobs/Path.cpp b/src/Mobs/Path.cpp
index 8701dad10..a0b83f593 100644
--- a/src/Mobs/Path.cpp
+++ b/src/Mobs/Path.cpp
@@ -182,7 +182,13 @@ bool cPath::Step_Internal()
}
// Path found.
- if (CurrentCell->m_Location == m_Destination)
+ if (
+ (CurrentCell->m_Location == m_Destination + Vector3i(0, 0, 1)) ||
+ (CurrentCell->m_Location == m_Destination + Vector3i(1, 0, 0)) ||
+ (CurrentCell->m_Location == m_Destination + Vector3i(-1, 0, 0)) ||
+ (CurrentCell->m_Location == m_Destination + Vector3i(0, 0, -1)) ||
+ (CurrentCell->m_Location == m_Destination + Vector3i(0, -1, 0))
+ )
{
do
{