1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-01 19:09:40 +00:00

Remove redundant member function

mActive is public.
This commit is contained in:
elsid 2023-05-10 22:46:21 +02:00
parent b2f7fc70a6
commit fd249b46c0
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625

View file

@ -61,9 +61,6 @@ namespace MWRender
void setDefaults(osg::Camera* camera) override; void setDefaults(osg::Camera* camera) override;
bool isActive() { return mActive; }
void setIsActive(bool active) { mActive = active; }
osg::Node* mSceneRoot; osg::Node* mSceneRoot;
osg::Matrix mProjectionMatrix; osg::Matrix mProjectionMatrix;
osg::Matrix mViewMatrix; osg::Matrix mViewMatrix;
@ -243,7 +240,7 @@ namespace MWRender
auto it = mLocalMapRTTs.begin(); auto it = mLocalMapRTTs.begin();
while (it != mLocalMapRTTs.end()) while (it != mLocalMapRTTs.end())
{ {
if (!(*it)->isActive()) if (!(*it)->mActive)
{ {
mRoot->removeChild(*it); mRoot->removeChild(*it);
it = mLocalMapRTTs.erase(it); it = mLocalMapRTTs.erase(it);
@ -758,13 +755,10 @@ namespace MWRender
void CameraLocalUpdateCallback::operator()(LocalMapRenderToTexture* node, osg::NodeVisitor* nv) void CameraLocalUpdateCallback::operator()(LocalMapRenderToTexture* node, osg::NodeVisitor* nv)
{ {
if (!node->isActive()) if (!node->mActive)
node->setNodeMask(0); node->setNodeMask(0);
if (node->isActive()) node->mActive = false;
{
node->setIsActive(false);
}
// Rtt-nodes do not forward update traversal to their cameras so we can traverse safely. // Rtt-nodes do not forward update traversal to their cameras so we can traverse safely.
// Traverse in case there are nested callbacks. // Traverse in case there are nested callbacks.