summaryrefslogtreecommitdiffstats
path: root/src/LineBlockTracer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/LineBlockTracer.cpp')
-rw-r--r--src/LineBlockTracer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/LineBlockTracer.cpp b/src/LineBlockTracer.cpp
index ee28bef88..315e8d082 100644
--- a/src/LineBlockTracer.cpp
+++ b/src/LineBlockTracer.cpp
@@ -96,17 +96,17 @@ bool cLineBlockTracer::Trace(double a_StartX, double a_StartY, double a_StartZ,
m_Callbacks->OnIntoWorld(m_StartX, m_StartY, m_StartZ);
}
- m_CurrentX = static_cast<int>(floor(m_StartX));
- m_CurrentY = static_cast<int>(floor(m_StartY));
- m_CurrentZ = static_cast<int>(floor(m_StartZ));
+ m_CurrentX = FloorC(m_StartX);
+ m_CurrentY = FloorC(m_StartY);
+ m_CurrentZ = FloorC(m_StartZ);
m_DiffX = m_EndX - m_StartX;
m_DiffY = m_EndY - m_StartY;
m_DiffZ = m_EndZ - m_StartZ;
// The actual trace is handled with ChunkMapCS locked by calling our Item() for the specified chunk
- int BlockX = static_cast<int>(floor(m_StartX));
- int BlockZ = static_cast<int>(floor(m_StartZ));
+ int BlockX = FloorC(m_StartX);
+ int BlockZ = FloorC(m_StartZ);
int ChunkX, ChunkZ;
cChunkDef::BlockToChunk(BlockX, BlockZ, ChunkX, ChunkZ);
return m_World->DoWithChunk(ChunkX, ChunkZ, *this);