mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 21:40:03 +00:00
Avoid redundant getCell()->getGrid* calls
This commit is contained in:
parent
1324256440
commit
d927aaad14
@ -257,16 +257,15 @@ namespace MWRender
|
|||||||
{
|
{
|
||||||
mInterior = false;
|
mInterior = false;
|
||||||
|
|
||||||
int x = cell->getCell()->getGridX();
|
const int x = cell->getCell()->getGridX();
|
||||||
int y = cell->getCell()->getGridY();
|
const int y = cell->getCell()->getGridY();
|
||||||
|
|
||||||
osg::BoundingSphere bound = mSceneRoot->getBound();
|
osg::BoundingSphere bound = mSceneRoot->getBound();
|
||||||
float zmin = bound.center().z() - bound.radius();
|
float zmin = bound.center().z() - bound.radius();
|
||||||
float zmax = bound.center().z() + bound.radius();
|
float zmax = bound.center().z() + bound.radius();
|
||||||
|
|
||||||
setupRenderToTexture(cell->getCell()->getGridX(), cell->getCell()->getGridY(),
|
setupRenderToTexture(x, y, x * mMapWorldSize + mMapWorldSize / 2.f, y * mMapWorldSize + mMapWorldSize / 2.f,
|
||||||
x * mMapWorldSize + mMapWorldSize / 2.f, y * mMapWorldSize + mMapWorldSize / 2.f, osg::Vec3d(0, 1, 0), zmin,
|
osg::Vec3d(0, 1, 0), zmin, zmax);
|
||||||
zmax);
|
|
||||||
|
|
||||||
if (segment.mFogOfWarImage != nullptr)
|
if (segment.mFogOfWarImage != nullptr)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user