LineBlockTracer: Using the coord-based block faces.
This commit is contained in:
parent
d96f622437
commit
1480d6d64d
@ -179,9 +179,9 @@ bool cLineBlockTracer::MoveToNextBlock(void)
|
|||||||
// Based on the wall hit, adjust the current coords
|
// Based on the wall hit, adjust the current coords
|
||||||
switch (Direction)
|
switch (Direction)
|
||||||
{
|
{
|
||||||
case dirX: m_CurrentX += m_DirX; m_CurrentFace = (m_DirX > 0) ? BLOCK_FACE_EAST : BLOCK_FACE_WEST; break;
|
case dirX: m_CurrentX += m_DirX; m_CurrentFace = (m_DirX > 0) ? BLOCK_FACE_XM : BLOCK_FACE_XP; break;
|
||||||
case dirY: m_CurrentY += m_DirY; m_CurrentFace = (m_DirY > 0) ? BLOCK_FACE_BOTTOM : BLOCK_FACE_TOP; break;
|
case dirY: m_CurrentY += m_DirY; m_CurrentFace = (m_DirY > 0) ? BLOCK_FACE_YM : BLOCK_FACE_YP; break;
|
||||||
case dirZ: m_CurrentZ += m_DirZ; m_CurrentFace = (m_DirZ > 0) ? BLOCK_FACE_SOUTH : BLOCK_FACE_NORTH; break;
|
case dirZ: m_CurrentZ += m_DirZ; m_CurrentFace = (m_DirZ > 0) ? BLOCK_FACE_ZM : BLOCK_FACE_ZP; break;
|
||||||
case dirNONE: return false;
|
case dirNONE: return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user