diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Items/ItemBucket.h | 2 | ||||
-rw-r--r-- | src/LineBlockTracer.cpp | 17 |
2 files changed, 10 insertions, 9 deletions
diff --git a/src/Items/ItemBucket.h b/src/Items/ItemBucket.h index 84835c021..a733bda19 100644 --- a/src/Items/ItemBucket.h +++ b/src/Items/ItemBucket.h @@ -215,7 +215,7 @@ public: } Callbacks; cLineBlockTracer Tracer(*a_World, Callbacks); - Vector3d Start(a_Player->GetEyePosition() + a_Player->GetLookVector()); + Vector3d Start(a_Player->GetEyePosition()); Vector3d End(a_Player->GetEyePosition() + a_Player->GetLookVector() * 5); // cTracer::Trace returns true when whole line was traversed. By returning true when we hit something, we ensure that this never happens if liquid could be placed diff --git a/src/LineBlockTracer.cpp b/src/LineBlockTracer.cpp index b03652bab..2395aa43e 100644 --- a/src/LineBlockTracer.cpp +++ b/src/LineBlockTracer.cpp @@ -203,6 +203,15 @@ bool cLineBlockTracer::Item(cChunk * a_Chunk) m_Callbacks->OnNoChunk(); return false; } + + // Move to next block + if (!MoveToNextBlock()) + { + // We've reached the end + m_Callbacks->OnNoMoreHits(); + return true; + } + if (a_Chunk->IsValid()) { BLOCKTYPE BlockType; @@ -225,14 +234,6 @@ bool cLineBlockTracer::Item(cChunk * a_Chunk) } } - // Move to next block - if (!MoveToNextBlock()) - { - // We've reached the end - m_Callbacks->OnNoMoreHits(); - return true; - } - // Update the current chunk if (a_Chunk != NULL) { |