mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-20 19:41:36 +00:00
CLEANUP(animationbindings): Lowercase all input groupnames
This commit is contained in:
parent
6eee6e9468
commit
86f33cb6fe
1 changed files with 4 additions and 2 deletions
|
@ -258,9 +258,11 @@ namespace MWLua
|
||||||
float startPoint = options.get_or("startPoint", 0.0f);
|
float startPoint = options.get_or("startPoint", 0.0f);
|
||||||
bool forceLoop = options.get_or("forceLoop", false);
|
bool forceLoop = options.get_or("forceLoop", false);
|
||||||
|
|
||||||
|
const std::string_view lowerGroup = { Misc::StringUtils::lowerCase(groupName) };
|
||||||
|
|
||||||
auto animation = getMutableAnimationOrThrow(ObjectVariant(object));
|
auto animation = getMutableAnimationOrThrow(ObjectVariant(object));
|
||||||
animation->play(groupName, priority, blendMask, autoDisable, speed, start, stop, startPoint, loops,
|
animation->play(lowerGroup, priority, blendMask, autoDisable, speed, start, stop, startPoint, loops,
|
||||||
forceLoop || animation->isLoopingAnimation(groupName));
|
forceLoop || animation->isLoopingAnimation(lowerGroup));
|
||||||
};
|
};
|
||||||
|
|
||||||
api["hasGroup"] = [](const sol::object& object, std::string_view groupname) -> bool {
|
api["hasGroup"] = [](const sol::object& object, std::string_view groupname) -> bool {
|
||||||
|
|
Loading…
Reference in a new issue