Increase ESM4 active grid

simplify_debugging
Petr Mikheev 2 years ago
parent ac65246389
commit 29031d0586

@ -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());

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

@ -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";

Loading…
Cancel
Save