From 5d353fd8f82f93ba881e2f770ab65682dcfe9286 Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Tue, 5 Nov 2013 14:13:12 -0700 Subject: Added missing check for a_LineOfSight --- source/Tracer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/Tracer.cpp') 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 ); -- cgit v1.2.3