mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-25 12:41:01 +00:00
Avoid redundant lookup
This commit is contained in:
parent
624ffef4fe
commit
1324256440
@ -194,7 +194,7 @@ namespace MWRender
|
||||
MapSegment& segment = mExteriorSegments[std::make_pair(cellX, cellY)];
|
||||
if (!segment.needUpdate)
|
||||
return;
|
||||
requestExteriorMap(cell);
|
||||
requestExteriorMap(cell, segment);
|
||||
segment.needUpdate = false;
|
||||
}
|
||||
|
||||
@ -253,7 +253,7 @@ namespace MWRender
|
||||
}
|
||||
}
|
||||
|
||||
void LocalMap::requestExteriorMap(const MWWorld::CellStore* cell)
|
||||
void LocalMap::requestExteriorMap(const MWWorld::CellStore* cell, MapSegment& segment)
|
||||
{
|
||||
mInterior = false;
|
||||
|
||||
@ -268,9 +268,6 @@ namespace MWRender
|
||||
x * mMapWorldSize + mMapWorldSize / 2.f, y * mMapWorldSize + mMapWorldSize / 2.f, osg::Vec3d(0, 1, 0), zmin,
|
||||
zmax);
|
||||
|
||||
MapSegment& segment
|
||||
= mExteriorSegments[std::make_pair(cell->getCell()->getGridX(), cell->getCell()->getGridY())];
|
||||
|
||||
if (segment.mFogOfWarImage != nullptr)
|
||||
return;
|
||||
|
||||
|
@ -143,7 +143,7 @@ namespace MWRender
|
||||
float mAngle;
|
||||
const osg::Vec2f rotatePoint(const osg::Vec2f& point, const osg::Vec2f& center, const float angle);
|
||||
|
||||
void requestExteriorMap(const MWWorld::CellStore* cell);
|
||||
void requestExteriorMap(const MWWorld::CellStore* cell, MapSegment& segment);
|
||||
void requestInteriorMap(const MWWorld::CellStore* cell);
|
||||
|
||||
void setupRenderToTexture(
|
||||
|
Loading…
x
Reference in New Issue
Block a user