1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

Merge branch 'grid_update' into 'master'

Update mHalfGridSize in Scene::changeCellGrid before using it

See merge request OpenMW/openmw!3030
This commit is contained in:
Tetramir 2023-05-21 17:05:01 +00:00
commit 3d574f16a1

View File

@ -543,6 +543,8 @@ namespace MWWorld
void Scene::changeCellGrid(const osg::Vec3f& pos, ESM::ExteriorCellLocation playerCellIndex, bool changeEvent)
{
mHalfGridSize
= isEsm4Ext(playerCellIndex.mWorldspace) ? Constants::ESM4CellGridRadius : Constants::CellGridRadius;
auto navigatorUpdateGuard = mNavigator.makeUpdateGuard();
int playerCellX = playerCellIndex.mX;
int playerCellY = playerCellIndex.mY;