1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 03:40:14 +00:00

Update mHalfGridSize in Scene::changeCellGrid before using it.

This commit is contained in:
Petr Mikheev 2023-05-19 17:52:12 +02:00
parent 5f6ca2a6d1
commit 1d55844f26

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;