mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-30 03:32:36 +00:00
Merge branch 'getactivegroup' into 'master'
Throw on invalid bone group indices in getActiveGroup See merge request OpenMW/openmw!4171
This commit is contained in:
commit
a1cacbe164
@ -218,6 +218,8 @@ namespace MWLua
|
||||
getMutableAnimationOrThrow(ObjectVariant(object))->adjustSpeedMult(groupname, speed);
|
||||
};
|
||||
api["getActiveGroup"] = [](const sol::object& object, MWRender::BoneGroup boneGroup) -> std::string_view {
|
||||
if (boneGroup < 0 || boneGroup >= BoneGroup::Num_BoneGroups)
|
||||
throw std::runtime_error("Invalid bonegroup: " + std::to_string(boneGroup));
|
||||
return getConstAnimationOrThrow(ObjectVariant(object))->getActiveGroup(boneGroup);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user