diff options
author | worktycho <work.tycho@gmail.com> | 2015-05-07 22:58:02 +0200 |
---|---|---|
committer | worktycho <work.tycho@gmail.com> | 2015-05-07 22:58:02 +0200 |
commit | 011126293b42efad5ccbef912c44418c2437cf78 (patch) | |
tree | 278caa29a65bfab2b7a5079adec772c701c11976 /src/Mobs/Path.cpp | |
parent | Merge pull request #1951 from mc-server/BroadcastRefactor (diff) | |
parent | AI - Safer WouldBurnAt() (diff) | |
download | cuberite-011126293b42efad5ccbef912c44418c2437cf78.tar cuberite-011126293b42efad5ccbef912c44418c2437cf78.tar.gz cuberite-011126293b42efad5ccbef912c44418c2437cf78.tar.bz2 cuberite-011126293b42efad5ccbef912c44418c2437cf78.tar.lz cuberite-011126293b42efad5ccbef912c44418c2437cf78.tar.xz cuberite-011126293b42efad5ccbef912c44418c2437cf78.tar.zst cuberite-011126293b42efad5ccbef912c44418c2437cf78.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 60f88f525..6fc9e06c3 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; |