diff options
author | Samuel Barney <samjbarney@gmail.com> | 2013-11-05 22:13:12 +0100 |
---|---|---|
committer | Samuel Barney <samjbarney@gmail.com> | 2013-11-05 22:13:12 +0100 |
commit | 5d353fd8f82f93ba881e2f770ab65682dcfe9286 (patch) | |
tree | 5a1e3ac33e69c4d62645fcb70acd2696698d1583 /source/Tracer.cpp | |
parent | cTracer can now handle mob sight. (diff) | |
download | cuberite-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.cpp | 2 |
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 ); |