summaryrefslogtreecommitdiffstats
path: root/source/Tracer.cpp
diff options
context:
space:
mode:
authorSamuel Barney <samjbarney@gmail.com>2013-11-05 22:13:12 +0100
committerSamuel Barney <samjbarney@gmail.com>2013-11-05 22:13:12 +0100
commit5d353fd8f82f93ba881e2f770ab65682dcfe9286 (patch)
tree5a1e3ac33e69c4d62645fcb70acd2696698d1583 /source/Tracer.cpp
parentcTracer can now handle mob sight. (diff)
downloadcuberite-5d353fd8f82f93ba881e2f770ab65682dcfe9286.tar
cuberite-5d353fd8f82f93ba881e2f770ab65682dcfe9286.tar.gz
cuberite-5d353fd8f82f93ba881e2f770ab65682dcfe9286.tar.bz2
cuberite-5d353fd8f82f93ba881e2f770ab65682dcfe9286.tar.lz
cuberite-5d353fd8f82f93ba881e2f770ab65682dcfe9286.tar.xz
cuberite-5d353fd8f82f93ba881e2f770ab65682dcfe9286.tar.zst
cuberite-5d353fd8f82f93ba881e2f770ab65682dcfe9286.zip
Diffstat (limited to '')
-rw-r--r--source/Tracer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/Tracer.cpp b/source/Tracer.cpp
index bad1604d7..ef136302f 100644
--- a/source/Tracer.cpp
+++ b/source/Tracer.cpp
@@ -226,7 +226,7 @@ bool cTracer::Trace( const Vector3f & a_Start, const Vector3f & a_Direction, int
BLOCKTYPE BlockID = m_World->GetBlock(pos.x, pos.y, pos.z);
// Block is counted as a collision if we are not doing a line of sight and it is solid,
// or if the block is not air and not water. That way mobs can still see underwater.
- if ((!a_LineOfSight && g_BlockIsSolid[BlockID]) || (BlockID != E_BLOCK_AIR && !IsBlockWater(BlockID)))
+ if ((!a_LineOfSight && g_BlockIsSolid[BlockID]) || (a_LineOfSight && (BlockID != E_BLOCK_AIR) && !IsBlockWater(BlockID)))
{
BlockHitPosition = pos;
int Normal = GetHitNormal(a_Start, End, pos );