From ec3de19c4e0df620cba1d10036fcd472a4a5dc35 Mon Sep 17 00:00:00 2001 From: 12xx12 <12xx12100@gmail.com> Date: Sun, 9 Aug 2020 23:50:24 +0200 Subject: small issues addressed in #4817 fixed because was merged to fast --- src/Generating/FinishGen.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/Generating') diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp index 71be3e497..25c53e563 100644 --- a/src/Generating/FinishGen.cpp +++ b/src/Generating/FinishGen.cpp @@ -1783,15 +1783,7 @@ void cFinishGenOreNests::GenerateOre( int BaseY = nestRnd % a_MaxHeight; nestRnd /= a_MaxHeight; // if the NestSize is smaller then four this breaks - int NestSize; - if (a_NestSize >= 4) - { - NestSize = a_NestSize + (nestRnd % (a_NestSize / 4)); // The actual nest size may be up to 1 / 4 larger - } - else - { - NestSize = a_NestSize; - } + int NestSize = a_NestSize + (nestRnd % (std::max(a_NestSize, 4) / 4)); // The actual nest size may be up to 1 / 4 larger int Num = 0; while (Num < NestSize) { -- cgit v1.2.3