Avoid redundant lookup

simplify_debugging
elsid 2 years ago
parent 624ffef4fe
commit 1324256440
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -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…
Cancel
Save