1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-11 06:40:34 +00:00
This commit is contained in:
scrawl 2012-03-23 17:37:56 +01:00
parent 7a3034701f
commit a6259a1b0d
3 changed files with 7 additions and 3 deletions

View File

@ -264,11 +264,12 @@ void LocalMapBase::init(MyGUI::ScrollView* widget, OEngine::GUI::Layout* layout)
void LocalMapBase::setCellPrefix(const std::string& prefix) void LocalMapBase::setCellPrefix(const std::string& prefix)
{ {
mPrefix = prefix; mPrefix = prefix;
mChanged = true;
} }
void LocalMapBase::setActiveCell(const int x, const int y, bool interior) void LocalMapBase::setActiveCell(const int x, const int y, bool interior)
{ {
if (x==mCurX && y==mCurY && mInterior==interior) return; // don't do anything if we're still in the same cell if (x==mCurX && y==mCurY && mInterior==interior && !mChanged) return; // don't do anything if we're still in the same cell
for (int mx=0; mx<3; ++mx) for (int mx=0; mx<3; ++mx)
{ {
for (int my=0; my<3; ++my) for (int my=0; my<3; ++my)
@ -298,5 +299,6 @@ void LocalMapBase::setActiveCell(const int x, const int y, bool interior)
mInterior = interior; mInterior = interior;
mCurX = x; mCurX = x;
mCurY = y; mCurY = y;
mChanged = false;
} }

View File

@ -44,6 +44,7 @@ namespace MWGui
bool mInterior; bool mInterior;
MyGUI::ScrollView* mLocalMap; MyGUI::ScrollView* mLocalMap;
std::string mPrefix; std::string mPrefix;
bool mChanged;
OEngine::GUI::Layout* mLayout; OEngine::GUI::Layout* mLayout;
}; };

View File

@ -153,8 +153,9 @@ void LocalMap::render(const float x, const float y,
// make everything visible // make everything visible
mRendering->getScene()->setAmbientLight(ColourValue(1,1,1)); mRendering->getScene()->setAmbientLight(ColourValue(1,1,1));
mCellCamera->setPosition(Vector3(x, zhigh, y)); mCellCamera->setPosition(Vector3(x, zhigh+100000, y));
mCellCamera->setFarClipDistance( (zhigh-zlow) * 1.1 ); //mCellCamera->setFarClipDistance( (zhigh-zlow) * 1.1 );
mCellCamera->setFarClipDistance(0); // infinite
mCellCamera->setOrthoWindow(xw, yw); mCellCamera->setOrthoWindow(xw, yw);