summaryrefslogtreecommitdiffstats
path: root/src/Tracer.cpp
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2016-02-06 11:37:34 +0100
committerJulian Laubstein <julianlaubstein@yahoo.de>2016-02-06 11:37:34 +0100
commit6fdd7194c81be7234a126bdc3b48f0291fce3567 (patch)
tree7d5ac74b7385ce4ebf77588d80549c884c2b993c /src/Tracer.cpp
parentMerge pull request #2958 from LogicParrot/fence (diff)
parentBulk clearing of whitespace (diff)
downloadcuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.gz
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.bz2
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.lz
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.xz
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.zst
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.zip
Diffstat (limited to 'src/Tracer.cpp')
-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;