projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71ffe69
)
Cavegen: Fix non-constant array initializer error for MSVC
author
SmallJoker
<mk939@ymail.com>
Fri, 7 Apr 2017 15:59:27 +0000
(17:59 +0200)
committer
SmallJoker
<mk939@ymail.com>
Fri, 7 Apr 2017 15:59:27 +0000
(17:59 +0200)
src/cavegen.cpp
patch
|
blob
|
history
diff --git
a/src/cavegen.cpp
b/src/cavegen.cpp
index 6275c516e1c6a1565544523c687298c7436216b7..7993b20e7932a7ab2dd0631c091f2481129b2442 100644
(file)
--- a/
src/cavegen.cpp
+++ b/
src/cavegen.cpp
@@
-199,7
+199,7
@@
bool CavernsNoise::generateCaverns(MMVManip *vm, v3s16 nmin, v3s16 nmax)
noise_cavern->perlinMap3D(nmin.X, nmin.Y - 1, nmin.Z);
// Cache cavern_amp values
- float
cavern_amp
[m_csize.Y + 1];
+ float
*cavern_amp = new float
[m_csize.Y + 1];
u8 cavern_amp_index = 0; // Index zero at column top
for (s16 y = nmax.Y; y >= nmin.Y - 1; y--, cavern_amp_index++) {
cavern_amp[cavern_amp_index] =
@@
-241,6
+241,7
@@
bool CavernsNoise::generateCaverns(MMVManip *vm, v3s16 nmin, v3s16 nmax)
}
}
+ delete[] cavern_amp;
return has_cavern;
}