mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 08:53:52 +00:00
Move dtNavMeshParams initialization to where it's required
This commit is contained in:
parent
e89b304fed
commit
3cbe93358a
1 changed files with 2 additions and 2 deletions
|
@ -517,8 +517,6 @@ namespace DetourNavigator
|
||||||
" playerTile=(" << playerTile << ")" <<
|
" playerTile=(" << playerTile << ")" <<
|
||||||
" changedTileDistance=" << getDistance(changedTile, playerTile);
|
" changedTileDistance=" << getDistance(changedTile, playerTile);
|
||||||
|
|
||||||
const auto params = *navMeshCacheItem->lockConst()->getImpl().getParams();
|
|
||||||
|
|
||||||
if (!recastMesh)
|
if (!recastMesh)
|
||||||
{
|
{
|
||||||
Log(Debug::Debug) << "Ignore add tile: recastMesh is null";
|
Log(Debug::Debug) << "Ignore add tile: recastMesh is null";
|
||||||
|
@ -542,6 +540,8 @@ namespace DetourNavigator
|
||||||
return navMeshCacheItem->lock()->removeTile(changedTile);
|
return navMeshCacheItem->lock()->removeTile(changedTile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dtNavMeshParams params = *navMeshCacheItem->lockConst()->getImpl().getParams();
|
||||||
|
|
||||||
if (!shouldAddTile(changedTile, playerTile, std::min(settings.mMaxTilesNumber, params.maxTiles)))
|
if (!shouldAddTile(changedTile, playerTile, std::min(settings.mMaxTilesNumber, params.maxTiles)))
|
||||||
{
|
{
|
||||||
Log(Debug::Debug) << "Ignore add tile: too far from player";
|
Log(Debug::Debug) << "Ignore add tile: too far from player";
|
||||||
|
|
Loading…
Reference in a new issue