mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 21:45:33 +00:00
Terrain: moved ESM::Land load to earlier in the startup procedure
Required for background loading as we cannot load ESM::Land data from background threads.
This commit is contained in:
parent
6c863486e1
commit
065b6d3331
2 changed files with 3 additions and 11 deletions
|
@ -75,10 +75,9 @@ namespace MWRender
|
|||
|
||||
if (land)
|
||||
{
|
||||
if (!land->isDataLoaded(ESM::Land::DATA_VHGT))
|
||||
{
|
||||
land->loadData(ESM::Land::DATA_VHGT);
|
||||
}
|
||||
int mask = ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML | ESM::Land::DATA_VCLR | ESM::Land::DATA_VTEX;
|
||||
if (!land->isDataLoaded(mask))
|
||||
land->loadData(mask);
|
||||
}
|
||||
|
||||
for (int cellY=0; cellY<cellSize; ++cellY)
|
||||
|
|
|
@ -46,10 +46,6 @@ namespace MWRender
|
|||
const MWWorld::ESMStore &esmStore =
|
||||
MWBase::Environment::get().getWorld()->getStore();
|
||||
ESM::Land* land = esmStore.get<ESM::Land>().search(cellX, cellY);
|
||||
// Load the data we are definitely going to need
|
||||
int mask = ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML | ESM::Land::DATA_VCLR | ESM::Land::DATA_VTEX;
|
||||
if (land && !land->isDataLoaded(mask))
|
||||
land->loadData(mask);
|
||||
return land;
|
||||
}
|
||||
|
||||
|
@ -316,9 +312,6 @@ namespace MWRender
|
|||
ESM::Land* land = getLand(cellX, cellY);
|
||||
if (land)
|
||||
{
|
||||
if (!land->isDataLoaded(ESM::Land::DATA_VTEX))
|
||||
land->loadData(ESM::Land::DATA_VTEX);
|
||||
|
||||
int tex = land->mLandData->mTextures[y * ESM::Land::LAND_TEXTURE_SIZE + x];
|
||||
if (tex == 0)
|
||||
return std::make_pair(0,0); // vtex 0 is always the base texture, regardless of plugin
|
||||
|
|
Loading…
Reference in a new issue