summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-10-21 17:00:41 +0200
committerHowaner <franzi.moos@googlemail.com>2014-10-21 17:00:41 +0200
commita07456d7126d61d903eb7c14f88d436d20546474 (patch)
tree5450e047e9ab138f90618b9e08d292fb13b377f5
parentMerge branch 'master' into ChunkLoader (diff)
downloadcuberite-a07456d7126d61d903eb7c14f88d436d20546474.tar
cuberite-a07456d7126d61d903eb7c14f88d436d20546474.tar.gz
cuberite-a07456d7126d61d903eb7c14f88d436d20546474.tar.bz2
cuberite-a07456d7126d61d903eb7c14f88d436d20546474.tar.lz
cuberite-a07456d7126d61d903eb7c14f88d436d20546474.tar.xz
cuberite-a07456d7126d61d903eb7c14f88d436d20546474.tar.zst
cuberite-a07456d7126d61d903eb7c14f88d436d20546474.zip
-rw-r--r--src/ClientHandle.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index ec1bebe8d..28fcb0d37 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -430,13 +430,13 @@ bool cClientHandle::StreamNextChunk(void)
cCSLock Lock(m_CSChunkLists);
// High priority: Load the chunks that are in the view-direction of the player (with a radius of 3)
- for (size_t Range = 0; Range < (size_t)m_ViewDistance; Range++)
+ for (int Range = 0; Range < m_ViewDistance; Range++)
{
Vector3d Vector = Position + LookVector * cChunkDef::Width * Range;
// Get the chunk from the x/z coords.
int RangeX, RangeZ = 0;
- cChunkDef::BlockToChunk((int)std::floor(Vector.x), (int)std::floor(Vector.z), RangeX, RangeZ);
+ cChunkDef::BlockToChunk(FloorC(Vector.x), FloorC(Vector.z), RangeX, RangeZ);
for (size_t X = 0; X < 7; X++)
{
@@ -471,13 +471,13 @@ bool cClientHandle::StreamNextChunk(void)
// Medium priority: Load the chunks that are behind the player
LookVector = m_Player->GetLookVector() * -1;
- for (size_t Range = 0; Range < 3; Range++)
+ 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((int)std::floor(Vector.x), (int)std::floor(Vector.z), RangeX, RangeZ);
+ cChunkDef::BlockToChunk(FloorC(Vector.x), FloorC(Vector.z), RangeX, RangeZ);
for (size_t X = 0; X < 7; X++)
{