mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-17 01:10:10 +00:00
Change setting to clamp the local viewing distance to fix value (instead of coeff)
This commit is contained in:
parent
b27de8f188
commit
b0e30e4bb6
@ -99,10 +99,9 @@ namespace
|
||||
return Constants::CellGridRadius;
|
||||
if (!Settings::Manager::getBool("distant terrain", "Terrain"))
|
||||
return Constants::CellGridRadius;
|
||||
const float localViewingDistanceCoef = Settings::Manager::getFloat("local viewing distance coef", "Map");
|
||||
const int viewingDistance = Settings::Manager::getInt("viewing distance", "Camera");
|
||||
const int localViewingDistanceInCells = (viewingDistance * localViewingDistanceCoef) / double(Constants::CellSizeInUnits);
|
||||
return std::max(Constants::CellGridRadius, localViewingDistanceInCells);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,14 +115,18 @@ If this setting is true the user can zoom in/out on local and global map with th
|
||||
|
||||
This setting can be controlled in Advanced tab of the launcher.
|
||||
|
||||
local viewing distance coef
|
||||
max local viewing distance
|
||||
---------------------------
|
||||
|
||||
:Type: float
|
||||
:Range: > 0 and <= 1
|
||||
:Default: 0.5
|
||||
:Type: integer
|
||||
:Range: > 0
|
||||
:Default: 10
|
||||
|
||||
This setting controls viewing distance on local map. It is the coefficient of the viewing distance viewable on the local map if 'distant terrain' is enabled otherwise you will see the default value (a 3x3 square centered on the player).
|
||||
This setting controls the viewing distance on local map when 'distant terrain' is enabled.
|
||||
If this setting is greater than the viewing distance then only up to the viewing distance is used for local map, otherwise the viewing distance is used.
|
||||
If view distance is changed in settings menu during the game, then viewable distance on the local map is not updated.
|
||||
.. warning::
|
||||
Increasing this setting can increase cell load times,
|
||||
because the localmap take a snapshot of each cell contained in a square of 2 x (max local viewing distance) + 1 square.
|
||||
|
||||
This setting can not be configured except by editing the settings configuration file.
|
||||
|
@ -205,8 +205,8 @@ global = false
|
||||
# If true, allow zoom on local and global maps
|
||||
allow zooming = false
|
||||
|
||||
# The local view distance coefficient (1.0 is full view distance if distant terrain is enabled)
|
||||
local viewing distance coef = 0.5
|
||||
# The local view distance in number of cells (up to the view distance)
|
||||
max local viewing distance = 10
|
||||
|
||||
[GUI]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user