Fixed a bug with buckets
* Additionally fixed cLineBlockTracer's EntryFace parameter when a block was hit on the first iteration along the projected line
This commit is contained in:
parent
9194438fb5
commit
960fcaa90c
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user