mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:53:50 +00:00
Do not use the delayed map cells update
This commit is contained in:
parent
92bed66e5f
commit
c2176945bd
4 changed files with 3 additions and 19 deletions
|
@ -837,22 +837,13 @@ namespace MWGui
|
|||
|
||||
void MapWindow::cellExplored(int x, int y)
|
||||
{
|
||||
mQueuedToExplore.push_back(std::make_pair(x,y));
|
||||
mGlobalMapRender->cleanupCameras();
|
||||
mGlobalMapRender->exploreCell(x, y, mLocalMapRender->getMapTexture(x, y));
|
||||
}
|
||||
|
||||
void MapWindow::onFrame(float dt)
|
||||
{
|
||||
LocalMapBase::onFrame(dt);
|
||||
|
||||
mGlobalMapRender->cleanupCameras();
|
||||
|
||||
for (CellId& cellId : mQueuedToExplore)
|
||||
{
|
||||
mGlobalMapRender->exploreCell(cellId.first, cellId.second, mLocalMapRender->getMapTexture(cellId.first, cellId.second));
|
||||
}
|
||||
|
||||
mQueuedToExplore.clear();
|
||||
|
||||
NoDrop::onFrame(dt);
|
||||
}
|
||||
|
||||
|
|
|
@ -261,10 +261,6 @@ namespace MWGui
|
|||
typedef std::pair<int, int> CellId;
|
||||
std::set<CellId> mMarkers;
|
||||
|
||||
// Cells that should be explored in the next frame (i.e. their map revealed on the global map)
|
||||
// We can't do this immediately, because the map update is not immediate either (see mNeedMapUpdate in scene.cpp)
|
||||
std::vector<CellId> mQueuedToExplore;
|
||||
|
||||
MyGUI::Button* mEventBoxGlobal;
|
||||
MyGUI::Button* mEventBoxLocal;
|
||||
|
||||
|
|
|
@ -1027,9 +1027,6 @@ namespace MWGui
|
|||
|
||||
updateMap();
|
||||
|
||||
if (!mMap->isVisible())
|
||||
mMap->onFrame(frameDuration);
|
||||
|
||||
mHud->onFrame(frameDuration);
|
||||
|
||||
mDebugWindow->onFrame(frameDuration);
|
||||
|
|
|
@ -293,7 +293,7 @@ namespace MWRender
|
|||
camera->setViewMatrix(osg::Matrix::identity());
|
||||
camera->setProjectionMatrix(osg::Matrix::identity());
|
||||
camera->setProjectionResizePolicy(osg::Camera::FIXED);
|
||||
camera->setRenderOrder(osg::Camera::PRE_RENDER);
|
||||
camera->setRenderOrder(osg::Camera::PRE_RENDER, 1); // Make sure the global map is rendered after the local map
|
||||
y = mHeight - y - height; // convert top-left origin to bottom-left
|
||||
camera->setViewport(x, y, width, height);
|
||||
|
||||
|
|
Loading…
Reference in a new issue