mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Fix local map viewing distance lower bound
This commit is contained in:
parent
b7763fad2d
commit
f99bcd7ccf
@ -104,7 +104,7 @@ namespace
|
||||
return Constants::CellGridRadius;
|
||||
const int maxLocalViewingDistance = std::max(Settings::Manager::getInt("max local viewing distance", "Map"), Constants::CellGridRadius);
|
||||
const int viewingDistanceInCells = Settings::Manager::getFloat("viewing distance", "Camera") / Constants::CellSizeInUnits;
|
||||
return std::min(maxLocalViewingDistance, viewingDistanceInCells);
|
||||
return std::clamp(viewingDistanceInCells, Constants::CellGridRadius, maxLocalViewingDistance);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user