mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
Don't discard object cache with uninitialized timestamp
This can happen during terrain loading
This commit is contained in:
parent
b2000b7642
commit
567ad293fd
1 changed files with 4 additions and 3 deletions
|
@ -75,10 +75,11 @@ void ObjectCache::updateTimeStampOfObjectsInCacheWithExternalReferences(double r
|
||||||
itr!=_objectCache.end();
|
itr!=_objectCache.end();
|
||||||
++itr)
|
++itr)
|
||||||
{
|
{
|
||||||
// if ref count is greater the 1 the object has an external reference.
|
// If ref count is greater than 1, the object has an external reference.
|
||||||
if (itr->second.first->referenceCount()>1)
|
// If the timestamp is yet to be initialized, it needs to be updated too.
|
||||||
|
if (itr->second.first->referenceCount()>1 || itr->second.second == 0.0)
|
||||||
{
|
{
|
||||||
// so update it time stamp.
|
// So update it.
|
||||||
itr->second.second = referenceTime;
|
itr->second.second = referenceTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue