From 1d55844f26000dc3a00b3bf175fe095a878b4ef1 Mon Sep 17 00:00:00 2001 From: Petr Mikheev Date: Fri, 19 May 2023 17:52:12 +0200 Subject: [PATCH] Update mHalfGridSize in Scene::changeCellGrid before using it. --- apps/openmw/mwworld/scene.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/openmw/mwworld/scene.cpp b/apps/openmw/mwworld/scene.cpp index 87234408d6..7e3a00df07 100644 --- a/apps/openmw/mwworld/scene.cpp +++ b/apps/openmw/mwworld/scene.cpp @@ -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;