1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

Load present cell store when requested

This commit is contained in:
elsid 2023-07-23 18:25:20 +02:00
parent 1a7b4283e7
commit 8ceb79caf5
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

View File

@ -231,7 +231,12 @@ namespace MWWorld
{
auto it = mCells.find(id);
if (it != mCells.end())
return &it->second;
{
CellStore& cellStore = it->second;
if (forceLoad && cellStore.getState() != CellStore::State_Loaded)
cellStore.load();
return &cellStore;
}
if (id == draftCellId)
{