mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-29 21:45:33 +00:00
Pass land reference to LandObject constructor
This commit is contained in:
parent
e6f35373b5
commit
28614730da
4 changed files with 9 additions and 9 deletions
|
@ -39,7 +39,7 @@ namespace CSVRender
|
|||
|
||||
const ESM::Land& land = mData.getLand().getRecord(index).get();
|
||||
return new ESMTerrain::LandObject(
|
||||
&land, ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML | ESM::Land::DATA_VCLR | ESM::Land::DATA_VTEX);
|
||||
land, ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML | ESM::Land::DATA_VCLR | ESM::Land::DATA_VTEX);
|
||||
}
|
||||
|
||||
const ESM::LandTexture* TerrainStorage::getLandTexture(int index, short plugin)
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace MWRender
|
|||
const ESM4::Land* land = world->getStore().get<ESM4::Land>().search(cellIndex);
|
||||
if (!land)
|
||||
return nullptr;
|
||||
osg::ref_ptr<ESMTerrain::LandObject> landObj(new ESMTerrain::LandObject(land, mLoadFlags));
|
||||
osg::ref_ptr<ESMTerrain::LandObject> landObj(new ESMTerrain::LandObject(*land, mLoadFlags));
|
||||
mCache->addEntryToObjectCache(cellIndex, landObj.get());
|
||||
return landObj;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ namespace MWRender
|
|||
const ESM::Land* land = world->getStore().get<ESM::Land>().search(cellIndex.mX, cellIndex.mY);
|
||||
if (!land)
|
||||
return nullptr;
|
||||
osg::ref_ptr<ESMTerrain::LandObject> landObj(new ESMTerrain::LandObject(land, mLoadFlags));
|
||||
osg::ref_ptr<ESMTerrain::LandObject> landObj(new ESMTerrain::LandObject(*land, mLoadFlags));
|
||||
mCache->addEntryToObjectCache(cellIndex, landObj.get());
|
||||
return landObj;
|
||||
}
|
||||
|
|
|
@ -46,13 +46,13 @@ namespace ESMTerrain
|
|||
Map mMap;
|
||||
};
|
||||
|
||||
LandObject::LandObject(const ESM4::Land* land, int loadFlags)
|
||||
: mData(*land, loadFlags)
|
||||
LandObject::LandObject(const ESM4::Land& land, int loadFlags)
|
||||
: mData(land, loadFlags)
|
||||
{
|
||||
}
|
||||
|
||||
LandObject::LandObject(const ESM::Land* land, int loadFlags)
|
||||
: mData(*land, loadFlags)
|
||||
LandObject::LandObject(const ESM::Land& land, int loadFlags)
|
||||
: mData(land, loadFlags)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ namespace ESMTerrain
|
|||
{
|
||||
public:
|
||||
LandObject() = default;
|
||||
LandObject(const ESM::Land* land, int loadFlags);
|
||||
LandObject(const ESM4::Land* land, int loadFlags);
|
||||
LandObject(const ESM::Land& land, int loadFlags);
|
||||
LandObject(const ESM4::Land& land, int loadFlags);
|
||||
|
||||
META_Object(ESMTerrain, LandObject)
|
||||
|
||||
|
|
Loading…
Reference in a new issue