summaryrefslogtreecommitdiffstats
path: root/source/Tracer.cpp
diff options
context:
space:
mode:
authorSamuel Barney <samjbarney@gmail.com>2013-11-05 22:01:51 +0100
committerSamuel Barney <samjbarney@gmail.com>2013-11-05 22:01:51 +0100
commit9d5d74d826ceaa227c3d1684dde0743c08ae1175 (patch)
treea201eed8386f607f26e2cb9b51959368d7c63fdd /source/Tracer.cpp
parentMoved cTracer::SetValues to be an internal function because it is only ever used in cTracer::Trace. (diff)
downloadcuberite-9d5d74d826ceaa227c3d1684dde0743c08ae1175.tar
cuberite-9d5d74d826ceaa227c3d1684dde0743c08ae1175.tar.gz
cuberite-9d5d74d826ceaa227c3d1684dde0743c08ae1175.tar.bz2
cuberite-9d5d74d826ceaa227c3d1684dde0743c08ae1175.tar.lz
cuberite-9d5d74d826ceaa227c3d1684dde0743c08ae1175.tar.xz
cuberite-9d5d74d826ceaa227c3d1684dde0743c08ae1175.tar.zst
cuberite-9d5d74d826ceaa227c3d1684dde0743c08ae1175.zip
Diffstat (limited to '')
-rw-r--r--source/Tracer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/Tracer.cpp b/source/Tracer.cpp
index d7a613891..4d036486e 100644
--- a/source/Tracer.cpp
+++ b/source/Tracer.cpp
@@ -131,12 +131,12 @@ void cTracer::SetValues(const Vector3f & a_Start, const Vector3f & a_Direction)
-int cTracer::Trace( const Vector3f & a_Start, const Vector3f & a_Direction, int a_Distance)
+bool cTracer::Trace( const Vector3f & a_Start, const Vector3f & a_Direction, int a_Distance)
{
if ((a_Start.y < 0) || (a_Start.y >= cChunkDef::Height))
{
LOGD("%s: Start Y is outside the world (%.2f), not tracing.", __FUNCTION__, a_Start.y);
- return 0;
+ return false;
}
SetValues(a_Start, a_Direction);
@@ -157,7 +157,7 @@ int cTracer::Trace( const Vector3f & a_Start, const Vector3f & a_Direction, int
// check if first is occupied
if (pos.Equals(end1))
{
- return 0;
+ return false;
}
bool reachedX = false, reachedY = false, reachedZ = false;
@@ -236,7 +236,7 @@ int cTracer::Trace( const Vector3f & a_Start, const Vector3f & a_Direction, int
return true;
}
}
- return 0;
+ return false;
}