diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-28 14:20:36 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-28 14:20:36 +0200 |
commit | 015b3a5d19b650c297f9caac2b3c5d4a4882728c (patch) | |
tree | 892e4727be054998924c4e3a7a0a6baef7a338be /source/Caves.cpp | |
parent | Removed bottom lava from caves generator, added a new finish generator BottomLava for that. Also fixed a slight error in SameBlock composition generator cfg (diff) | |
download | cuberite-015b3a5d19b650c297f9caac2b3c5d4a4882728c.tar cuberite-015b3a5d19b650c297f9caac2b3c5d4a4882728c.tar.gz cuberite-015b3a5d19b650c297f9caac2b3c5d4a4882728c.tar.bz2 cuberite-015b3a5d19b650c297f9caac2b3c5d4a4882728c.tar.lz cuberite-015b3a5d19b650c297f9caac2b3c5d4a4882728c.tar.xz cuberite-015b3a5d19b650c297f9caac2b3c5d4a4882728c.tar.zst cuberite-015b3a5d19b650c297f9caac2b3c5d4a4882728c.zip |
Diffstat (limited to 'source/Caves.cpp')
-rw-r--r-- | source/Caves.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/Caves.cpp b/source/Caves.cpp index 4cc8506ed..e06539f0f 100644 --- a/source/Caves.cpp +++ b/source/Caves.cpp @@ -481,7 +481,7 @@ void cCaveTunnel::ProcessChunk( int DifY = itr->m_BlockY;
int DifZ = itr->m_BlockZ - BlockStartZ; // substitution for faster calc
int Bottom = std::max(itr->m_BlockY - itr->m_Radius, 1);
- int Top = std::min(itr->m_BlockY + itr->m_Radius, cChunkDef::Height);
+ int Top = std::min(itr->m_BlockY + itr->m_Radius, (int)(cChunkDef::Height)); // Stupid gcc needs int cast
int SqRad = itr->m_Radius * itr->m_Radius;
for (int z = 0; z < cChunkDef::Width; z++) for (int x = 0; x < cChunkDef::Width; x++)
{
@@ -748,7 +748,7 @@ void cStructGenWormNestCaves::GetCavesForChunk(int a_ChunkX, int a_ChunkZ, cStru int EndX = (BaseX + NEIGHBORHOOD_SIZE + 1) * m_Grid;
int StartZ = BaseZ * m_Grid;
int EndZ = (BaseZ + NEIGHBORHOOD_SIZE + 1) * m_Grid;
- for (cCaveSystems::const_iterator itr = m_Cache.begin(), end = m_Cache.end(); itr != end;)
+ for (cCaveSystems::iterator itr = m_Cache.begin(), end = m_Cache.end(); itr != end;)
{
if (
((*itr)->m_BlockX >= StartX) && ((*itr)->m_BlockX < EndX) &&
@@ -795,7 +795,7 @@ void cStructGenWormNestCaves::GetCavesForChunk(int a_ChunkX, int a_ChunkZ, cStru // Trim the cache if it's too long:
if (m_Cache.size() > 100)
{
- cCaveSystems::const_iterator itr = m_Cache.begin();
+ cCaveSystems::iterator itr = m_Cache.begin();
std::advance(itr, 100);
for (cCaveSystems::const_iterator end = m_Cache.end(); itr != end; ++itr)
{
|