1
0

Fix big tree ring radius calculations. Ring radius now stays within range.

This commit is contained in:
Alexander Harkness 2020-08-05 18:36:38 +01:00
parent 4c0e7e0ab4
commit d6c5ac40a6
No known key found for this signature in database
GPG Key ID: 5187245ADF160B76

View File

@ -1035,11 +1035,11 @@ void GetLargeSpruceTreeImage(Vector3i a_BlockPos, cNoise & a_Noise, int a_Seq, s
for (int i = 0; i < LeavesRingCount; i++)
{
unsigned int Val = (a_Noise.IntNoise3DInt(a_BlockPos.addedXZ(32 * a_Seq, 32 * i)) / 23) % 8;
if ((Val < 4) && RingRadius <= 3)
if ((Val < 4) && RingRadius < 3)
{
RingRadius++;
}
else if ((Val >= 7) && (RingRadius <= 0))
else if ((Val == 7) && (RingRadius > 0))
{
RingRadius--;
}