mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-19 19:39:41 +00:00
Merge branch 'bodypartanimation' into 'master'
NpcAnimation: Assign parent animation time sources to body part controllers (bug #4822) Closes #4822 See merge request OpenMW/openmw!3653
This commit is contained in:
commit
2fde1ef3d8
4 changed files with 5 additions and 5 deletions
|
@ -15,6 +15,7 @@
|
|||
Bug #4743: PlayGroup doesn't play non-looping animations correctly
|
||||
Bug #4754: Stack of ammunition cannot be equipped partially
|
||||
Bug #4816: GetWeaponDrawn returns 1 before weapon is attached
|
||||
Bug #4822: Non-weapon equipment and body parts can't inherit time from parent animation
|
||||
Bug #5057: Weapon swing sound plays at same pitch whether it hits or misses
|
||||
Bug #5062: Root bone rotations for NPC animation don't work the same as for creature animation
|
||||
Bug #5066: Quirks with starting and stopping scripted animations
|
||||
|
|
|
@ -314,6 +314,7 @@ namespace MWRender
|
|||
if (node == nullptr)
|
||||
return;
|
||||
|
||||
// This is used to avoid playing animations intended for equipped weapons on holstered weapons.
|
||||
SceneUtil::ForceControllerSourcesVisitor removeVisitor(std::make_shared<NullAnimationTime>());
|
||||
node->accept(removeVisitor);
|
||||
}
|
||||
|
@ -345,9 +346,7 @@ namespace MWRender
|
|||
if (mesh.empty() || boneName.empty())
|
||||
return;
|
||||
|
||||
// If the scabbard is not found, use a weapon mesh as fallback.
|
||||
// Note: it is unclear how to handle time for controllers attached to bodyparts, so disable them for now.
|
||||
// We use the similar approach for other bodyparts.
|
||||
// If the scabbard is not found, use the weapon mesh as fallback.
|
||||
scabbardName = scabbardName.replace(scabbardName.size() - 4, 4, "_sh.nif");
|
||||
bool isEnchanted = !weapon->getClass().getEnchantment(*weapon).empty();
|
||||
if (!mResourceSystem->getVFS()->exists(scabbardName))
|
||||
|
|
|
@ -168,7 +168,7 @@ namespace MWRender
|
|||
if (slot == MWWorld::InventoryStore::Slot_CarriedRight)
|
||||
source = mWeaponAnimationTime;
|
||||
else
|
||||
source = std::make_shared<NullAnimationTime>();
|
||||
source = mAnimationTimePtr[0];
|
||||
|
||||
SceneUtil::AssignControllerSourcesVisitor assignVisitor(source);
|
||||
attached->accept(assignVisitor);
|
||||
|
|
|
@ -842,7 +842,7 @@ namespace MWRender
|
|||
if (type == ESM::PRT_Weapon)
|
||||
src = mWeaponAnimationTime;
|
||||
else
|
||||
src = std::make_shared<NullAnimationTime>();
|
||||
src = mAnimationTimePtr[0];
|
||||
SceneUtil::AssignControllerSourcesVisitor assignVisitor(src);
|
||||
node->accept(assignVisitor);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue