1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 23:23:52 +00:00

cells were sometimes not fully loaded

This commit is contained in:
Marc Zinnschlag 2012-02-12 12:35:29 +01:00
parent bc71fb47e0
commit a0ac6e5150

View file

@ -63,10 +63,11 @@ MWWorld::Ptr::CellStore *MWWorld::Cells::getExterior (int x, int y)
result = mExteriors.insert (std::make_pair (
std::make_pair (x, y), Ptr::CellStore (cell))).first;
result->second.load (mStore, mReader);
}
if (result->second.mState!=Ptr::CellStore::State_Loaded)
result->second.load (mStore, mReader);
return &result->second;
}
@ -79,10 +80,11 @@ MWWorld::Ptr::CellStore *MWWorld::Cells::getInterior (const std::string& name)
const ESM::Cell *cell = mStore.cells.findInt (name);
result = mInteriors.insert (std::make_pair (name, Ptr::CellStore (cell))).first;
result->second.load (mStore, mReader);
}
if (result->second.mState!=Ptr::CellStore::State_Loaded)
result->second.load (mStore, mReader);
return &result->second;
}