Node name lookups should be case insensitive

Concerns "AttachLight", "BoneOffset" and equipment part attachment points, that are all case insensitive in vanilla MW.
c++11
scrawl 10 years ago
parent cd7808fc11
commit 12f3198f68

@ -65,7 +65,7 @@ namespace SceneUtil
AssignControllerSourcesVisitor();
AssignControllerSourcesVisitor(boost::shared_ptr<ControllerSource> toAssign);
/// Assign the wanted ControllerSource. May be overriden in derived classes.
/// Assign the wanted ControllerSource. May be overridden in derived classes.
/// By default assigns the ControllerSource passed to the constructor of this class if no ControllerSource is assigned to that controller yet.
virtual void visit(osg::Node& node, Controller& ctrl);

@ -3,6 +3,8 @@
#include <osg/NodeVisitor>
#include <components/misc/stringops.hpp>
// Commonly used scene graph visitors
namespace SceneUtil
{
@ -19,7 +21,7 @@ namespace SceneUtil
virtual void apply(osg::Group& group)
{
if (group.getName() == mNameToFind)
if (Misc::StringUtils::ciEqual(group.getName(), mNameToFind))
{
mFoundNode = &group;
return;

Loading…
Cancel
Save