From 2d549d088e77ee5fdbda7085f72208f4dfa46e34 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 7 Mar 2017 18:31:53 +0100 Subject: [PATCH] Get the world size from the ESM::Land store --- apps/openmw/mwrender/terrainstorage.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/openmw/mwrender/terrainstorage.cpp b/apps/openmw/mwrender/terrainstorage.cpp index 9d229c96c5..ff2a8bfc78 100644 --- a/apps/openmw/mwrender/terrainstorage.cpp +++ b/apps/openmw/mwrender/terrainstorage.cpp @@ -31,17 +31,17 @@ namespace MWRender const MWWorld::ESMStore &esmStore = MWBase::Environment::get().getWorld()->getStore(); - MWWorld::Store::iterator it = esmStore.get().extBegin(); - for (; it != esmStore.get().extEnd(); ++it) + MWWorld::Store::iterator it = esmStore.get().begin(); + for (; it != esmStore.get().end(); ++it) { - if (it->getGridX() < minX) - minX = static_cast(it->getGridX()); - if (it->getGridX() > maxX) - maxX = static_cast(it->getGridX()); - if (it->getGridY() < minY) - minY = static_cast(it->getGridY()); - if (it->getGridY() > maxY) - maxY = static_cast(it->getGridY()); + if (it->mX < minX) + minX = static_cast(it->mX); + if (it->mX > maxX) + maxX = static_cast(it->mX); + if (it->mY < minY) + minY = static_cast(it->mY); + if (it->mY > maxY) + maxY = static_cast(it->mY); } // since grid coords are at cell origin, we need to add 1 cell