PF - Handle all fencetypes
This commit is contained in:
parent
291370e367
commit
5f7455bc19
@ -157,8 +157,14 @@ bool cPath::IsSolid(const Vector3i & a_Location)
|
|||||||
int RelZ = a_Location.z - m_Chunk->GetPosZ() * cChunkDef::Width;
|
int RelZ = a_Location.z - m_Chunk->GetPosZ() * cChunkDef::Width;
|
||||||
|
|
||||||
m_Chunk->GetBlockTypeMeta(RelX, a_Location.y, RelZ, BlockType, BlockMeta);
|
m_Chunk->GetBlockTypeMeta(RelX, a_Location.y, RelZ, BlockType, BlockMeta);
|
||||||
if ((BlockType == E_BLOCK_FENCE) || (BlockType == E_BLOCK_FENCE_GATE))
|
if (
|
||||||
|
(BlockType == E_BLOCK_FENCE) ||
|
||||||
|
(BlockType == E_BLOCK_FENCE_GATE) ||
|
||||||
|
(BlockType == E_BLOCK_NETHER_BRICK_FENCE) ||
|
||||||
|
((BlockType >= E_BLOCK_SPRUCE_FENCE_GATE) && (BlockType <= E_BLOCK_ACACIA_FENCE))
|
||||||
|
)
|
||||||
{
|
{
|
||||||
|
// TODO move this out of IsSolid to a proper place.
|
||||||
GetCell(a_Location + Vector3i(0, 1, 0))->m_IsSolid = true; // Mobs will always think that the fence is 2 blocks high and therefore won't jump over.
|
GetCell(a_Location + Vector3i(0, 1, 0))->m_IsSolid = true; // Mobs will always think that the fence is 2 blocks high and therefore won't jump over.
|
||||||
}
|
}
|
||||||
if (BlockType == E_BLOCK_STATIONARY_WATER)
|
if (BlockType == E_BLOCK_STATIONARY_WATER)
|
||||||
|
Loading…
Reference in New Issue
Block a user