mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
Cap global map cell size (bug #6222)
This commit is contained in:
parent
89c18d85de
commit
39c84c84da
5 changed files with 8 additions and 8 deletions
|
@ -18,6 +18,7 @@
|
||||||
Bug #5883: Immobile creatures don't cause water ripples
|
Bug #5883: Immobile creatures don't cause water ripples
|
||||||
Bug #5977: Fatigueless NPCs' corpse underwater changes animation on game load
|
Bug #5977: Fatigueless NPCs' corpse underwater changes animation on game load
|
||||||
Bug #6027: Collisionshape becomes spiderweb-like when the mesh is too complex
|
Bug #6027: Collisionshape becomes spiderweb-like when the mesh is too complex
|
||||||
|
Bug #6222: global map cell size can crash openmw if set to too high a value
|
||||||
Bug #6313: Followers with high Fight can turn hostile
|
Bug #6313: Followers with high Fight can turn hostile
|
||||||
Bug #6427: Enemy health bar disappears before damaging effect ends
|
Bug #6427: Enemy health bar disappears before damaging effect ends
|
||||||
Bug #6550: Cloned body parts don't inherit texture effects
|
Bug #6550: Cloned body parts don't inherit texture effects
|
||||||
|
|
|
@ -896,14 +896,14 @@ namespace MWGui
|
||||||
void MapWindow::onMapZoomed(MyGUI::Widget* sender, int rel)
|
void MapWindow::onMapZoomed(MyGUI::Widget* sender, int rel)
|
||||||
{
|
{
|
||||||
const static int localWidgetSize = Settings::Manager::getInt("local map widget size", "Map");
|
const static int localWidgetSize = Settings::Manager::getInt("local map widget size", "Map");
|
||||||
const static int globalCellSize = Settings::Manager::getInt("global map cell size", "Map");
|
|
||||||
|
|
||||||
const bool zoomOut = rel < 0;
|
const bool zoomOut = rel < 0;
|
||||||
const bool zoomIn = !zoomOut;
|
const bool zoomIn = !zoomOut;
|
||||||
const double speedDiff = zoomOut ? 1.0 / speed : speed;
|
const double speedDiff = zoomOut ? 1.0 / speed : speed;
|
||||||
const float localMapSizeInUnits = localWidgetSize * mNumCells;
|
const float localMapSizeInUnits = localWidgetSize * mNumCells;
|
||||||
|
|
||||||
const float currentMinLocalMapZoom = std::max({ (float(globalCellSize) * 4.f) / float(localWidgetSize),
|
const float currentMinLocalMapZoom = std::max({ (float(Settings::map().mGlobalMapCellSize) * 4.f)
|
||||||
|
/ float(localWidgetSize),
|
||||||
float(mLocalMap->getWidth()) / localMapSizeInUnits, float(mLocalMap->getHeight()) / localMapSizeInUnits });
|
float(mLocalMap->getWidth()) / localMapSizeInUnits, float(mLocalMap->getHeight()) / localMapSizeInUnits });
|
||||||
|
|
||||||
if (mGlobal)
|
if (mGlobal)
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <osgDB/WriteFile>
|
#include <osgDB/WriteFile>
|
||||||
|
|
||||||
#include <components/files/memorystream.hpp>
|
#include <components/files/memorystream.hpp>
|
||||||
#include <components/settings/settings.hpp>
|
#include <components/settings/values.hpp>
|
||||||
|
|
||||||
#include <components/debug/debuglog.hpp>
|
#include <components/debug/debuglog.hpp>
|
||||||
|
|
||||||
|
@ -263,7 +263,8 @@ namespace MWRender
|
||||||
};
|
};
|
||||||
|
|
||||||
GlobalMap::GlobalMap(osg::Group* root, SceneUtil::WorkQueue* workQueue)
|
GlobalMap::GlobalMap(osg::Group* root, SceneUtil::WorkQueue* workQueue)
|
||||||
: mRoot(root)
|
: mCellSize(Settings::map().mGlobalMapCellSize)
|
||||||
|
, mRoot(root)
|
||||||
, mWorkQueue(workQueue)
|
, mWorkQueue(workQueue)
|
||||||
, mWidth(0)
|
, mWidth(0)
|
||||||
, mHeight(0)
|
, mHeight(0)
|
||||||
|
@ -271,9 +272,7 @@ namespace MWRender
|
||||||
, mMaxX(0)
|
, mMaxX(0)
|
||||||
, mMinY(0)
|
, mMinY(0)
|
||||||
, mMaxY(0)
|
, mMaxY(0)
|
||||||
|
|
||||||
{
|
{
|
||||||
mCellSize = Settings::Manager::getInt("global map cell size", "Map");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalMap::~GlobalMap()
|
GlobalMap::~GlobalMap()
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace Settings
|
||||||
{
|
{
|
||||||
using WithIndex::WithIndex;
|
using WithIndex::WithIndex;
|
||||||
|
|
||||||
SettingValue<int> mGlobalMapCellSize{ mIndex, "Map", "global map cell size", makeMaxSanitizerInt(1) };
|
SettingValue<int> mGlobalMapCellSize{ mIndex, "Map", "global map cell size", makeClampSanitizerInt(1, 50) };
|
||||||
SettingValue<int> mLocalMapHudWidgetSize{ mIndex, "Map", "local map hud widget size", makeMaxSanitizerInt(1) };
|
SettingValue<int> mLocalMapHudWidgetSize{ mIndex, "Map", "local map hud widget size", makeMaxSanitizerInt(1) };
|
||||||
SettingValue<bool> mLocalMapHudFogOfWar{ mIndex, "Map", "local map hud fog of war" };
|
SettingValue<bool> mLocalMapHudFogOfWar{ mIndex, "Map", "local map hud fog of war" };
|
||||||
SettingValue<int> mLocalMapResolution{ mIndex, "Map", "local map resolution", makeMaxSanitizerInt(1) };
|
SettingValue<int> mLocalMapResolution{ mIndex, "Map", "local map resolution", makeMaxSanitizerInt(1) };
|
||||||
|
|
|
@ -15,7 +15,7 @@ global map cell size
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
:Type: integer
|
:Type: integer
|
||||||
:Range: >= 1
|
:Range: 1 to 50
|
||||||
:Default: 18
|
:Default: 18
|
||||||
|
|
||||||
This setting adjusts the scale of the world map in the GUI mode map window.
|
This setting adjusts the scale of the world map in the GUI mode map window.
|
||||||
|
|
Loading…
Reference in a new issue