summaryrefslogtreecommitdiffstats
path: root/source/Tracer.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-09-02 15:15:28 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-09-02 15:15:28 +0200
commit20b64e18e49550e7a105899045fd51be192e86bc (patch)
treec261c71ea2feb99bc5d4b058da5811c6b80db70c /source/Tracer.cpp
parentMinecart enhancements [SEE DESC] (diff)
parentExported BroadcastSoundEffect and BroadcastSoundParticleEffect to the Lua API (diff)
downloadcuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar
cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar.gz
cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar.bz2
cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar.lz
cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar.xz
cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar.zst
cuberite-20b64e18e49550e7a105899045fd51be192e86bc.zip
Diffstat (limited to 'source/Tracer.cpp')
-rw-r--r--source/Tracer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/Tracer.cpp b/source/Tracer.cpp
index 6d37f2ed8..42f1ae5dd 100644
--- a/source/Tracer.cpp
+++ b/source/Tracer.cpp
@@ -133,9 +133,9 @@ 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)
{
- if (a_Start.y < 0)
+ if ((a_Start.y < 0) || (a_Start.y >= cChunkDef::Height))
{
- LOGD("%s: Start is below the world", __FUNCTION__);
+ LOGD("%s: Start Y is outside the world (%.2f), not tracing.", __FUNCTION__, a_Start.y);
return 0;
}