mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-31 07:06:45 +00:00
Get the world size from the ESM::Land store
This commit is contained in:
parent
14225a42c6
commit
2d549d088e
1 changed files with 10 additions and 10 deletions
|
@ -31,17 +31,17 @@ namespace MWRender
|
||||||
const MWWorld::ESMStore &esmStore =
|
const MWWorld::ESMStore &esmStore =
|
||||||
MWBase::Environment::get().getWorld()->getStore();
|
MWBase::Environment::get().getWorld()->getStore();
|
||||||
|
|
||||||
MWWorld::Store<ESM::Cell>::iterator it = esmStore.get<ESM::Cell>().extBegin();
|
MWWorld::Store<ESM::Land>::iterator it = esmStore.get<ESM::Land>().begin();
|
||||||
for (; it != esmStore.get<ESM::Cell>().extEnd(); ++it)
|
for (; it != esmStore.get<ESM::Land>().end(); ++it)
|
||||||
{
|
{
|
||||||
if (it->getGridX() < minX)
|
if (it->mX < minX)
|
||||||
minX = static_cast<float>(it->getGridX());
|
minX = static_cast<float>(it->mX);
|
||||||
if (it->getGridX() > maxX)
|
if (it->mX > maxX)
|
||||||
maxX = static_cast<float>(it->getGridX());
|
maxX = static_cast<float>(it->mX);
|
||||||
if (it->getGridY() < minY)
|
if (it->mY < minY)
|
||||||
minY = static_cast<float>(it->getGridY());
|
minY = static_cast<float>(it->mY);
|
||||||
if (it->getGridY() > maxY)
|
if (it->mY > maxY)
|
||||||
maxY = static_cast<float>(it->getGridY());
|
maxY = static_cast<float>(it->mY);
|
||||||
}
|
}
|
||||||
|
|
||||||
// since grid coords are at cell origin, we need to add 1 cell
|
// since grid coords are at cell origin, we need to add 1 cell
|
||||||
|
|
Loading…
Reference in a new issue