summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-10-21 17:35:23 +0200
committerHowaner <franzi.moos@googlemail.com>2014-10-21 17:35:23 +0200
commitb0988e65aadc1a9d33065cf6afefc05dbf768ef8 (patch)
treead2b28cef36bfb02e5b51e9394f064c2dec7a4a9 /src/ClientHandle.cpp
parentNew c++11 stuff. (diff)
downloadcuberite-b0988e65aadc1a9d33065cf6afefc05dbf768ef8.tar
cuberite-b0988e65aadc1a9d33065cf6afefc05dbf768ef8.tar.gz
cuberite-b0988e65aadc1a9d33065cf6afefc05dbf768ef8.tar.bz2
cuberite-b0988e65aadc1a9d33065cf6afefc05dbf768ef8.tar.lz
cuberite-b0988e65aadc1a9d33065cf6afefc05dbf768ef8.tar.xz
cuberite-b0988e65aadc1a9d33065cf6afefc05dbf768ef8.tar.zst
cuberite-b0988e65aadc1a9d33065cf6afefc05dbf768ef8.zip
Diffstat (limited to '')
-rw-r--r--src/ClientHandle.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 28fcb0d37..ce5056f30 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -469,47 +469,6 @@ bool cClientHandle::StreamNextChunk(void)
}
}
- // Medium priority: Load the chunks that are behind the player
- LookVector = m_Player->GetLookVector() * -1;
- for (int Range = 0; Range < 3; Range++)
- {
- Vector3d Vector = Position + LookVector * cChunkDef::Width * Range;
-
- // Get the chunk from the x/z coords.
- int RangeX, RangeZ = 0;
- cChunkDef::BlockToChunk(FloorC(Vector.x), FloorC(Vector.z), RangeX, RangeZ);
-
- for (size_t X = 0; X < 7; X++)
- {
- for (size_t Z = 0; Z < 7; Z++)
- {
- int ChunkX = RangeX + ((X >= 4) ? (3 - X) : X);
- int ChunkZ = RangeZ + ((Z >= 4) ? (3 - Z) : Z);
- cChunkCoords Coords(ChunkX, ChunkZ);
-
- // Checks if the chunk is in distance
- if ((Diff(ChunkX, ChunkPosX) > m_ViewDistance) || (Diff(ChunkZ, ChunkPosZ) > m_ViewDistance))
- {
- continue;
- }
-
- // If the chunk already loading/loaded -> skip
- if (
- (std::find(m_ChunksToSend.begin(), m_ChunksToSend.end(), Coords) != m_ChunksToSend.end()) ||
- (std::find(m_LoadedChunks.begin(), m_LoadedChunks.end(), Coords) != m_LoadedChunks.end())
- )
- {
- continue;
- }
-
- // Unloaded chunk found -> Send it to the client.
- Lock.Unlock();
- StreamChunk(ChunkX, ChunkZ, cChunkSender::E_CHUNK_PRIORITY_MEDIUM);
- return false;
- }
- }
- }
-
// Low priority: Add all chunks that are in range. (From the center out to the edge)
for (int d = 0; d <= m_ViewDistance; ++d) // cycle through (square) distance, from nearest to furthest
{