mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-16 16:06:23 -04:00
Use std::vector to collect ChunkIds to be removed
Cache does not have duplicated entries.
This commit is contained in:
parent
b64069156d
commit
b5a75ba96c
@ -898,10 +898,10 @@ namespace MWRender
|
|||||||
if (mActiveGridOnly && !std::get<2>(id))
|
if (mActiveGridOnly && !std::get<2>(id))
|
||||||
return;
|
return;
|
||||||
if (intersects(id))
|
if (intersects(id))
|
||||||
mCollected.insert(id);
|
mCollected.push_back(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::set<ChunkId>& getCollected() const { return mCollected; }
|
const std::vector<ChunkId>& getCollected() const { return mCollected; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool intersects(ChunkId id) const
|
bool intersects(ChunkId id) const
|
||||||
@ -914,7 +914,7 @@ namespace MWRender
|
|||||||
|
|
||||||
bool mActiveGridOnly;
|
bool mActiveGridOnly;
|
||||||
osg::Vec2f mPosition;
|
osg::Vec2f mPosition;
|
||||||
std::set<ChunkId> mCollected;
|
std::vector<ChunkId> mCollected;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user