1
0

Merge branch 'master' into Cocoa

This commit is contained in:
Howaner 2014-12-14 13:14:58 +01:00
commit 6436fe73ca
2 changed files with 26 additions and 5 deletions

View File

@ -11,9 +11,11 @@ before_install:
- sudo apt-get update -qq - sudo apt-get update -qq
install: install:
# g++4.8 # g++4.8 and clang
- sudo apt-get install -qq g++-4.8 - sudo apt-get install -qq g++-4.8
- export CXX="g++-4.8"
# g++4.8
- if [ "$CXX" == "g++" ]; then export CXX="g++-4.8"; export CC="gcc-4.8"; fi
# Build MCServer # Build MCServer
script: ./CIbuild.sh script: ./CIbuild.sh

View File

@ -100,6 +100,7 @@ public:
void ProcessChunk( void ProcessChunk(
int a_ChunkX, int a_ChunkZ, int a_ChunkX, int a_ChunkZ,
cChunkDef::BlockTypes & a_BlockTypes, cChunkDef::BlockTypes & a_BlockTypes,
cChunkDesc::BlockNibbleBytes & a_BlockMetas,
cChunkDef::HeightMap & a_HeightMap cChunkDef::HeightMap & a_HeightMap
); );
@ -455,6 +456,7 @@ void cCaveTunnel::CalcBoundingBox(void)
void cCaveTunnel::ProcessChunk( void cCaveTunnel::ProcessChunk(
int a_ChunkX, int a_ChunkZ, int a_ChunkX, int a_ChunkZ,
cChunkDef::BlockTypes & a_BlockTypes, cChunkDef::BlockTypes & a_BlockTypes,
cChunkDesc::BlockNibbleBytes & a_BlockMetas,
cChunkDef::HeightMap & a_HeightMap cChunkDef::HeightMap & a_HeightMap
) )
{ {
@ -505,6 +507,22 @@ void cCaveTunnel::ProcessChunk(
cChunkDef::SetBlock(a_BlockTypes, x, y, z, E_BLOCK_AIR); cChunkDef::SetBlock(a_BlockTypes, x, y, z, E_BLOCK_AIR);
} }
} }
else if (SqDist <= SqRad * 2)
{
if (cChunkDef::GetBlock(a_BlockTypes, x, y, z) == E_BLOCK_SAND)
{
int Index = cChunkDef::MakeIndexNoCheck(x, y, z);
if (a_BlockMetas[Index] == 1)
{
a_BlockMetas[Index] = 0;
cChunkDef::SetBlock(a_BlockTypes, x, y, z, E_BLOCK_RED_SANDSTONE);
}
else
{
cChunkDef::SetBlock(a_BlockTypes, x, y, z, E_BLOCK_SANDSTONE);
}
}
}
} // for y } // for y
} // for x, z } // for x, z
} // for itr - m_Points[] } // for itr - m_Points[]
@ -596,11 +614,12 @@ void cStructGenWormNestCaves::cCaveSystem::DrawIntoChunk(cChunkDesc & a_ChunkDes
{ {
int ChunkX = a_ChunkDesc.GetChunkX(); int ChunkX = a_ChunkDesc.GetChunkX();
int ChunkZ = a_ChunkDesc.GetChunkZ(); int ChunkZ = a_ChunkDesc.GetChunkZ();
cChunkDef::BlockTypes & BlockTypes = a_ChunkDesc.GetBlockTypes(); cChunkDef::BlockTypes & BlockTypes = a_ChunkDesc.GetBlockTypes();
cChunkDef::HeightMap & HeightMap = a_ChunkDesc.GetHeightMap(); cChunkDef::HeightMap & HeightMap = a_ChunkDesc.GetHeightMap();
cChunkDesc::BlockNibbleBytes & BlockMetas = a_ChunkDesc.GetBlockMetasUncompressed();
for (cCaveTunnels::const_iterator itr = m_Tunnels.begin(), end = m_Tunnels.end(); itr != end; ++itr) for (cCaveTunnels::const_iterator itr = m_Tunnels.begin(), end = m_Tunnels.end(); itr != end; ++itr)
{ {
(*itr)->ProcessChunk(ChunkX, ChunkZ, BlockTypes, HeightMap); (*itr)->ProcessChunk(ChunkX, ChunkZ, BlockTypes, BlockMetas, HeightMap);
} // for itr - m_Tunnels[] } // for itr - m_Tunnels[]
} }