mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 23:26:41 +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
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -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…
	
		Reference in a new issue