forked from teamnwah/openmw-tes3coop
Add setting for exterior cell grid size (Fixes #1537)
This commit is contained in:
parent
a17252eab3
commit
d02e075bab
2 changed files with 12 additions and 7 deletions
|
@ -296,15 +296,17 @@ namespace MWWorld
|
||||||
std::string loadingExteriorText = "#{sLoadingMessage3}";
|
std::string loadingExteriorText = "#{sLoadingMessage3}";
|
||||||
loadingListener->setLabel(loadingExteriorText);
|
loadingListener->setLabel(loadingExteriorText);
|
||||||
|
|
||||||
|
const int halfGridSize = Settings::Manager::getInt("exterior grid size", "Cells")/2;
|
||||||
|
|
||||||
CellStoreCollection::iterator active = mActiveCells.begin();
|
CellStoreCollection::iterator active = mActiveCells.begin();
|
||||||
while (active!=mActiveCells.end())
|
while (active!=mActiveCells.end())
|
||||||
{
|
{
|
||||||
if ((*active)->getCell()->isExterior())
|
if ((*active)->getCell()->isExterior())
|
||||||
{
|
{
|
||||||
if (std::abs (X-(*active)->getCell()->getGridX())<=1 &&
|
if (std::abs (X-(*active)->getCell()->getGridX())<=halfGridSize &&
|
||||||
std::abs (Y-(*active)->getCell()->getGridY())<=1)
|
std::abs (Y-(*active)->getCell()->getGridY())<=halfGridSize)
|
||||||
{
|
{
|
||||||
// keep cells within the new 3x3 grid
|
// keep cells within the new grid
|
||||||
++active;
|
++active;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -314,9 +316,9 @@ namespace MWWorld
|
||||||
|
|
||||||
int refsToLoad = 0;
|
int refsToLoad = 0;
|
||||||
// get the number of refs to load
|
// get the number of refs to load
|
||||||
for (int x=X-1; x<=X+1; ++x)
|
for (int x=X-halfGridSize; x<=X+halfGridSize; ++x)
|
||||||
{
|
{
|
||||||
for (int y=Y-1; y<=Y+1; ++y)
|
for (int y=Y-halfGridSize; y<=Y+halfGridSize; ++y)
|
||||||
{
|
{
|
||||||
CellStoreCollection::iterator iter = mActiveCells.begin();
|
CellStoreCollection::iterator iter = mActiveCells.begin();
|
||||||
|
|
||||||
|
@ -339,9 +341,9 @@ namespace MWWorld
|
||||||
loadingListener->setProgressRange(refsToLoad);
|
loadingListener->setProgressRange(refsToLoad);
|
||||||
|
|
||||||
// Load cells
|
// Load cells
|
||||||
for (int x=X-1; x<=X+1; ++x)
|
for (int x=X-halfGridSize; x<=X+halfGridSize; ++x)
|
||||||
{
|
{
|
||||||
for (int y=Y-1; y<=Y+1; ++y)
|
for (int y=Y-halfGridSize; y<=Y+halfGridSize; ++y)
|
||||||
{
|
{
|
||||||
CellStoreCollection::iterator iter = mActiveCells.begin();
|
CellStoreCollection::iterator iter = mActiveCells.begin();
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,9 @@ local map resolution = 256
|
||||||
local map widget size = 512
|
local map widget size = 512
|
||||||
local map hud widget size = 256
|
local map hud widget size = 256
|
||||||
|
|
||||||
|
[Cells]
|
||||||
|
exterior grid size = 3
|
||||||
|
|
||||||
[Viewing distance]
|
[Viewing distance]
|
||||||
# Limit the rendering distance of small objects
|
# Limit the rendering distance of small objects
|
||||||
limit small object distance = false
|
limit small object distance = false
|
||||||
|
|
Loading…
Reference in a new issue