1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 15:29:55 +00:00

Fix a couple of minor issues in shadows

This commit is contained in:
Andrei Kortunov 2019-03-19 09:14:07 +04:00
parent 7995a92672
commit b2fca46206

View file

@ -777,6 +777,7 @@ MWShadowTechnique::MWShadowTechnique(const MWShadowTechnique& vdsm, const osg::C
ShadowTechnique(vdsm,copyop)
{
_shadowRecievingPlaceholderStateSet = new osg::StateSet;
_enableShadows = vdsm._enableShadows;
}
MWShadowTechnique::~MWShadowTechnique()
@ -2011,18 +2012,20 @@ struct ConvexHull
Vertices unwantedEdgeEnds = findInternalEdges(vertex, connectedVertices);
for (auto edgeEnd : unwantedEdgeEnds)
{
for (auto itr = _edges.begin(); itr != _edges.end(); ++itr)
for (auto itr = _edges.begin(); itr != _edges.end();)
{
if (*itr == Edge(vertex, edgeEnd))
{
_edges.erase(itr);
itr = _edges.erase(itr);
break;
}
else if (*itr == Edge(edgeEnd, vertex))
{
_edges.erase(itr);
itr = _edges.erase(itr);
break;
}
else
++itr;
}
}
}