1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 19:39:42 +00:00

Groundcover should ignore non-geometry Drawables

Fix https://gitlab.com/OpenMW/openmw/-/issues/7633

Untested - the issue didn't link to a mod using the mesh and I couldn't be bothered setting one up manually.
This commit is contained in:
AnyOldName3 2024-02-12 01:16:49 +00:00
parent 3301ebb2cb
commit 8c591a0b44
2 changed files with 13 additions and 0 deletions

View file

@ -111,6 +111,7 @@
Bug #7619: Long map notes may get cut off Bug #7619: Long map notes may get cut off
Bug #7630: Charm can be cast on creatures Bug #7630: Charm can be cast on creatures
Bug #7631: Cannot trade with/talk to Creeper or Mudcrab Merchant when they're fleeing Bug #7631: Cannot trade with/talk to Creeper or Mudcrab Merchant when they're fleeing
Bug #7633: Groundcover should ignore non-geometry Drawables
Bug #7636: Animations bug out when switching between 1st and 3rd person, while playing a scripted animation Bug #7636: Animations bug out when switching between 1st and 3rd person, while playing a scripted animation
Bug #7637: Actors can sometimes move while playing scripted animations Bug #7637: Actors can sometimes move while playing scripted animations
Bug #7639: NPCs don't use hand-to-hand if their other melee skills were damaged during combat Bug #7639: NPCs don't use hand-to-hand if their other melee skills were damaged during combat

View file

@ -196,6 +196,18 @@ namespace MWRender
{ {
} }
void apply(osg::Group& group) override
{
for (unsigned int i = 0; i < group.getNumChildren();)
{
if (group.getChild(i)->asDrawable() && !group.getChild(i)->asGeometry())
group.removeChild(i);
else
++i;
}
traverse(group);
}
void apply(osg::Geometry& geom) override void apply(osg::Geometry& geom) override
{ {
for (unsigned int i = 0; i < geom.getNumPrimitiveSets(); ++i) for (unsigned int i = 0; i < geom.getNumPrimitiveSets(); ++i)