mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-04 17:23:33 +01:00
Resource: Biome: fix integer underflow
Explicitly cast height value to signed integer to fix incorrect biome color values below a height of 64.
This commit is contained in:
parent
fd4773c8ca
commit
d4be401bcd
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ FloatColor Biome::getBlockColor(const BlockType *type, unsigned height) const {
|
|||
float(type->color.b),
|
||||
};
|
||||
|
||||
float t = clamp(temp - std::max(0.0f, (height-64)/600.0f), 0, 1);
|
||||
float t = clamp(temp - std::max(0.0f, (int(height)-64)/600.0f), 0, 1);
|
||||
float r = clamp(rain, 0, 1) * t;
|
||||
|
||||
if (type->flags & BLOCK_GRASS)
|
||||
|
|
Loading…
Add table
Reference in a new issue