1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-03 09:09:40 +00:00

Increase ESM4 active grid

This commit is contained in:
Petr Mikheev 2023-05-16 10:21:48 +02:00
parent ac65246389
commit 29031d0586
3 changed files with 5 additions and 1 deletions

View file

@ -779,6 +779,7 @@ namespace MWWorld
void Scene::changePlayerCell(CellStore& cell, const ESM::Position& pos, bool adjustPlayerPos)
{
mHalfGridSize = cell.getCell()->isEsm4() ? Constants::ESM4CellGridRadius : Constants::CellGridRadius;
mCurrentCell = &cell;
mRendering.enableTerrain(cell.isExterior());

View file

@ -102,7 +102,7 @@ namespace MWWorld
bool mPreloadFastTravel;
float mPredictionTime;
static const int mHalfGridSize = Constants::CellGridRadius;
int mHalfGridSize = Constants::CellGridRadius;
osg::Vec3f mLastPlayerPos;

View file

@ -28,6 +28,9 @@ namespace Constants
// Size of active cell grid in cells (it is a square with the (2 * CellGridRadius + 1) cells side)
constexpr int CellGridRadius = 1;
// ESM4 cells are twice smaller, so the active grid should have more cells.
constexpr int ESM4CellGridRadius = CellGridRadius * 2;
// A label to mark night/day visual switches
const std::string NightDayLabel = "NightDaySwitch";