diff options
author | r.ramazanov <r.ramazanov@servplus.ru> | 2014-04-23 16:15:28 +0200 |
---|---|---|
committer | r.ramazanov <r.ramazanov@servplus.ru> | 2014-04-23 16:15:28 +0200 |
commit | 103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932 (patch) | |
tree | b17cb676477be05abac7084bc0e1e49f651c2456 /src/Generating/Ravines.cpp | |
parent | Mobs shouldn't burn when it's Raining #906 (diff) | |
parent | Merge pull request #925 from archshift/master (diff) | |
download | cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar.gz cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar.bz2 cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar.lz cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar.xz cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar.zst cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.zip |
Diffstat (limited to 'src/Generating/Ravines.cpp')
-rw-r--r-- | src/Generating/Ravines.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Generating/Ravines.cpp b/src/Generating/Ravines.cpp index e64f55214..267dcbbf9 100644 --- a/src/Generating/Ravines.cpp +++ b/src/Generating/Ravines.cpp @@ -269,7 +269,7 @@ void cStructGenRavines::cRavine::GenerateBaseDefPoints(int a_BlockX, int a_Block int CenterZ = a_BlockZ + OffsetZ; // Get the base angle in which the ravine "axis" goes: - float Angle = (float)(((float)((a_Noise.IntNoise3DInt(20 * a_BlockX, 70 * a_BlockZ, 6000) / 9) % 16384)) / 16384.0 * 3.141592653); + float Angle = (float)(((float)((a_Noise.IntNoise3DInt(20 * a_BlockX, 70 * a_BlockZ, 6000) / 9) % 16384)) / 16384.0 * M_PI); float xc = sin(Angle); float zc = cos(Angle); @@ -311,12 +311,13 @@ void cStructGenRavines::cRavine::RefineDefPoints(const cRavDefPoints & a_Src, cR a_Dst.clear(); a_Dst.reserve(Num * 2 + 2); cRavDefPoints::const_iterator itr = a_Src.begin() + 1; - a_Dst.push_back(a_Src.front()); - int PrevX = a_Src.front().m_BlockX; - int PrevZ = a_Src.front().m_BlockZ; - int PrevR = a_Src.front().m_Radius; - int PrevT = a_Src.front().m_Top; - int PrevB = a_Src.front().m_Bottom; + const cRavDefPoint & Source = a_Src.front(); + a_Dst.push_back(Source); + int PrevX = Source.m_BlockX; + int PrevZ = Source.m_BlockZ; + int PrevR = Source.m_Radius; + int PrevT = Source.m_Top; + int PrevB = Source.m_Bottom; for (int i = 0; i <= Num; ++i, ++itr) { int dx = itr->m_BlockX - PrevX; |