Merge branch 'main' into release-0.26
This commit is contained in:
commit
b3c244e4eb
@ -133,11 +133,12 @@ static inline const Biome* choose_biome(
|
||||
score += glm::abs((params[i] - biome.parameters[i].value) /
|
||||
biome.parameters[i].weight);
|
||||
}
|
||||
if (score < chosenScore) {
|
||||
if (score < chosenScore || std::isinf(chosenScore)) {
|
||||
chosenScore = score;
|
||||
chosenBiome = &biome;
|
||||
}
|
||||
}
|
||||
assert(chosenBiome != nullptr);
|
||||
return chosenBiome;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user