mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
Merge branch 'fix_present_tile_crash' into 'master'
Add missing synchronization for present tiles modification See merge request OpenMW/openmw!878
This commit is contained in:
commit
e73c0f92b8
1 changed files with 6 additions and 0 deletions
|
@ -298,9 +298,15 @@ namespace DetourNavigator
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status == UpdateNavMeshStatus::removed || status == UpdateNavMeshStatus::lost)
|
if (status == UpdateNavMeshStatus::removed || status == UpdateNavMeshStatus::lost)
|
||||||
|
{
|
||||||
|
const std::scoped_lock lock(mMutex);
|
||||||
mPresentTiles.erase(std::make_tuple(job.mAgentHalfExtents, job.mChangedTile));
|
mPresentTiles.erase(std::make_tuple(job.mAgentHalfExtents, job.mChangedTile));
|
||||||
|
}
|
||||||
else if (isSuccess(status) && status != UpdateNavMeshStatus::ignored)
|
else if (isSuccess(status) && status != UpdateNavMeshStatus::ignored)
|
||||||
|
{
|
||||||
|
const std::scoped_lock lock(mMutex);
|
||||||
mPresentTiles.insert(std::make_tuple(job.mAgentHalfExtents, job.mChangedTile));
|
mPresentTiles.insert(std::make_tuple(job.mAgentHalfExtents, job.mChangedTile));
|
||||||
|
}
|
||||||
|
|
||||||
const auto finish = std::chrono::steady_clock::now();
|
const auto finish = std::chrono::steady_clock::now();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue