mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 22:36:39 +00:00
Fix #7696
This commit is contained in:
parent
647bd2b572
commit
310b8206dd
1 changed files with 2 additions and 1 deletions
|
@ -49,7 +49,8 @@ namespace Terrain
|
||||||
|
|
||||||
double timeLeft = availableTime;
|
double timeLeft = availableTime;
|
||||||
|
|
||||||
while (!mCompileSet.empty() && timeLeft > 0)
|
const auto deadline = std::chrono::steady_clock::now() + std::chrono::duration<double>(availableTime);
|
||||||
|
while (!mCompileSet.empty() && std::chrono::steady_clock::now() < deadline)
|
||||||
{
|
{
|
||||||
osg::ref_ptr<CompositeMap> node = *mCompileSet.begin();
|
osg::ref_ptr<CompositeMap> node = *mCompileSet.begin();
|
||||||
mCompileSet.erase(node);
|
mCompileSet.erase(node);
|
||||||
|
|
Loading…
Reference in a new issue