mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-05 06:40:09 +00:00
Merge branch 'limitedpower' into 'master'
Cap global map cell size (bug #6222) Closes #6222 See merge request OpenMW/openmw!3225
This commit is contained in:
commit
ce84fdf5f5
@ -19,6 +19,7 @@
|
||||
Bug #5977: Fatigueless NPCs' corpse underwater changes animation on game load
|
||||
Bug #6025: Subrecords cannot overlap records
|
||||
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 #6427: Enemy health bar disappears before damaging effect ends
|
||||
Bug #6550: Cloned body parts don't inherit texture effects
|
||||
|
@ -896,14 +896,14 @@ namespace MWGui
|
||||
void MapWindow::onMapZoomed(MyGUI::Widget* sender, int rel)
|
||||
{
|
||||
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 zoomIn = !zoomOut;
|
||||
const double speedDiff = zoomOut ? 1.0 / speed : speed;
|
||||
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 });
|
||||
|
||||
if (mGlobal)
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <osgDB/WriteFile>
|
||||
|
||||
#include <components/files/memorystream.hpp>
|
||||
#include <components/settings/settings.hpp>
|
||||
#include <components/settings/values.hpp>
|
||||
|
||||
#include <components/debug/debuglog.hpp>
|
||||
|
||||
@ -263,7 +263,8 @@ namespace MWRender
|
||||
};
|
||||
|
||||
GlobalMap::GlobalMap(osg::Group* root, SceneUtil::WorkQueue* workQueue)
|
||||
: mRoot(root)
|
||||
: mCellSize(Settings::map().mGlobalMapCellSize)
|
||||
, mRoot(root)
|
||||
, mWorkQueue(workQueue)
|
||||
, mWidth(0)
|
||||
, mHeight(0)
|
||||
@ -271,9 +272,7 @@ namespace MWRender
|
||||
, mMaxX(0)
|
||||
, mMinY(0)
|
||||
, mMaxY(0)
|
||||
|
||||
{
|
||||
mCellSize = Settings::Manager::getInt("global map cell size", "Map");
|
||||
}
|
||||
|
||||
GlobalMap::~GlobalMap()
|
||||
|
@ -18,7 +18,7 @@ namespace Settings
|
||||
{
|
||||
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<bool> mLocalMapHudFogOfWar{ mIndex, "Map", "local map hud fog of war" };
|
||||
SettingValue<int> mLocalMapResolution{ mIndex, "Map", "local map resolution", makeMaxSanitizerInt(1) };
|
||||
|
@ -15,7 +15,7 @@ global map cell size
|
||||
--------------------
|
||||
|
||||
:Type: integer
|
||||
:Range: >= 1
|
||||
:Range: 1 to 50
|
||||
:Default: 18
|
||||
|
||||
This setting adjusts the scale of the world map in the GUI mode map window.
|
||||
|
Loading…
x
Reference in New Issue
Block a user