When using ChunkWorx to generate multiple chunks, the server would sometimes fail an assert because it would generate a chunk even when it was successfully loaded. This was caused by chunks queued in cWorld's m_SetChunkDataQueue and thus being marked as "InQueue" although they were already loaded.
Solved by adding a new parameter to chunk coord callbacks specifying whether the operation succeeded or failed, and using that instead of the chunk presence flag to decide whether to generate or not.
* Growth has been slowed down
* Saplings do not grow if they do not have enough space to grow
* Saplings do not grow unless the light level is 9 or above
* Dark Oak doesn't grow unless it is in a 2x2
Jungle Trees now will grow into a large tree when 2x2 saplings are used.
With FreeBSD/clang, -Werror combined with the configured warning flags yields
some fatal errors, specifically related to signed conversion, 64 to 32 bit
conversion, and tautological compares.
CONTRIBUTORS
Add myself to the contributor list
src/Generating/FinishGen.cpp
In cFinishGenPassiveMobs::GetRandomMob(), change the type of RandMob
from size_t to the difference_type of the ListOfSpawnables iterator
MobIter. Using size_t triggers a 64 bit to 32 bit conversion if the
difference_type of the iterator class is 64 bit
Also explicitly cast the noise expression to unsigned long so we don't
get a signed conversion warning from the modulo against
ListOfSpawnables.size()
src/OSSupport/StackTrace.cpp
FreeBSD 10 and above includes a non glibc implementation of benchmark()
for which size_t, not int, is the return type. To account for this and
prevent a signed conversion warning, abstract the type for numItems with
a macro btsize
src/StringUtils.h
In StringToInteger(), correct a tautological compare warning for
unsigned types with the template. If T is unsigned, comparing
std::numeric_limits<T>::min() to the unsigned result is always
false. That control can enter this branch in an evaluated template with
an unsigned type T may also permit a signed number to be parsed and
erroneously stripped of its signedness at runtime. To guard against this
and avoid the warning in the case that the number parsed from the string
is non-positive, return false and don't try to parse if T is unsigned
and control enters the non-positive branch