summaryrefslogtreecommitdiffstats
path: root/src/Tracer.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-02-05 22:45:45 +0100
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-02-05 22:50:18 +0100
commitca6ef58b1ee8521e4b940ee4883dee714960e413 (patch)
tree8532add455224b07c07a759e3d906f50c0695888 /src/Tracer.cpp
parentMerge pull request #2972 from marvinkopf/PlayerAutoComplete (diff)
downloadcuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.gz
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.bz2
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.lz
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.xz
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.zst
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.zip
Diffstat (limited to '')
-rw-r--r--src/Tracer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Tracer.cpp b/src/Tracer.cpp
index 17f1bdfbc..913f25e01 100644
--- a/src/Tracer.cpp
+++ b/src/Tracer.cpp
@@ -166,11 +166,11 @@ bool cTracer::Trace(const Vector3f & a_Start, const Vector3f & a_Direction, int
LOGD("%s: Start Y is outside the world (%.2f), not tracing.", __FUNCTION__, a_Start.y);
return false;
}
-
+
SetValues(a_Start, a_Direction);
Vector3f End = a_Start + (dir * static_cast<float>(a_Distance));
-
+
if (End.y < 0)
{
float dist = -a_Start.y / dir.y; // No division by 0 possible
@@ -181,7 +181,7 @@ bool cTracer::Trace(const Vector3f & a_Start, const Vector3f & a_Direction, int
end1.x = static_cast<int>(floorf(End.x));
end1.y = static_cast<int>(floorf(End.y));
end1.z = static_cast<int>(floorf(End.z));
-
+
// check if first is occupied
if (pos.Equals(end1))
{
@@ -250,7 +250,7 @@ bool cTracer::Trace(const Vector3f & a_Start, const Vector3f & a_Direction, int
{
return false;
}
-
+
if ((pos.y < 0) || (pos.y >= cChunkDef::Height))
{
return false;
@@ -328,7 +328,7 @@ int cTracer::intersect3D_SegmentPlane(const Vector3f & a_Origin, const Vector3f
}
return 0; // no intersection
}
-
+
// they are not parallel
// compute intersect param
float sI = N / D;