From a07456d7126d61d903eb7c14f88d436d20546474 Mon Sep 17 00:00:00 2001 From: Howaner Date: Tue, 21 Oct 2014 17:00:41 +0200 Subject: New c++11 stuff. --- src/ClientHandle.cpp | 8 ++++---- 1 file 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++) { -- cgit v1.2.3