diff options
author | wiseoldman95 <softwatt@gmx.com> | 2015-05-06 16:23:07 +0200 |
---|---|---|
committer | wiseoldman95 <softwatt@gmx.com> | 2015-05-06 16:23:07 +0200 |
commit | b8aa38b18d7f7ab78766d2be94e8738e503bacca (patch) | |
tree | 63b42769a71a3107a10ecde5c8b3c45fa63aef0d /src/Mobs/Path.cpp | |
parent | Merge pull request #1946 from SafwatHalaby/lean (diff) | |
download | cuberite-b8aa38b18d7f7ab78766d2be94e8738e503bacca.tar cuberite-b8aa38b18d7f7ab78766d2be94e8738e503bacca.tar.gz cuberite-b8aa38b18d7f7ab78766d2be94e8738e503bacca.tar.bz2 cuberite-b8aa38b18d7f7ab78766d2be94e8738e503bacca.tar.lz cuberite-b8aa38b18d7f7ab78766d2be94e8738e503bacca.tar.xz cuberite-b8aa38b18d7f7ab78766d2be94e8738e503bacca.tar.zst cuberite-b8aa38b18d7f7ab78766d2be94e8738e503bacca.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Mobs/Path.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/Mobs/Path.cpp b/src/Mobs/Path.cpp index 84d888bf2..ebfb5b630 100644 --- a/src/Mobs/Path.cpp +++ b/src/Mobs/Path.cpp @@ -54,31 +54,6 @@ cPath::cPath( return; } - // If destination in water, set water surface as destination. - cChunk * Chunk = m_Chunk->GetNeighborChunk(m_Destination.x, m_Destination.z); - if ((Chunk != nullptr) && Chunk->IsValid()) - { - BLOCKTYPE BlockType; - NIBBLETYPE BlockMeta; - int RelX = m_Destination.x - Chunk->GetPosX() * cChunkDef::Width; - int RelZ = m_Destination.z - Chunk->GetPosZ() * cChunkDef::Width; - bool inwater = false; - for (;;) - { - Chunk->GetBlockTypeMeta(RelX, m_Destination.y, RelZ, BlockType, BlockMeta); - if (BlockType != E_BLOCK_STATIONARY_WATER) - { - break; - } - inwater = true; - m_Destination+=Vector3d(0, 1, 0); - } - if (inwater) - { - m_Destination+=Vector3d(0, -1, 0); - } - } - m_Status = ePathFinderStatus::CALCULATING; m_StepsLeft = a_MaxSteps; |