mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-14 01:19:59 +00:00
When a controller is present more than once in the same keyframe file, pick the first one (Fixes #2719)
This commit is contained in:
parent
eba8b4a518
commit
bc36269617
@ -333,7 +333,10 @@ namespace NifOsg
|
||||
osg::ref_ptr<NifOsg::KeyframeController> callback(new NifOsg::KeyframeController(key->data.getPtr()));
|
||||
callback->setFunction(boost::shared_ptr<NifOsg::ControllerFunction>(new NifOsg::ControllerFunction(key)));
|
||||
|
||||
target.mKeyframeControllers[strdata->string] = callback;
|
||||
if (target.mKeyframeControllers.find(strdata->string) != target.mKeyframeControllers.end())
|
||||
std::cerr << "Warning: controller " << strdata->string << " present more than once in " << nif->getFilename() << ", ignoring later version" << std::endl;
|
||||
else
|
||||
target.mKeyframeControllers[strdata->string] = callback;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user