mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 09:09:43 +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 #4743: PlayGroup doesn't play non-looping animations correctly
|
||||||
Bug #4754: Stack of ammunition cannot be equipped partially
|
Bug #4754: Stack of ammunition cannot be equipped partially
|
||||||
Bug #4816: GetWeaponDrawn returns 1 before weapon is attached
|
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 #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 #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
|
Bug #5066: Quirks with starting and stopping scripted animations
|
||||||
|
|
|
@ -314,6 +314,7 @@ namespace MWRender
|
||||||
if (node == nullptr)
|
if (node == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// This is used to avoid playing animations intended for equipped weapons on holstered weapons.
|
||||||
SceneUtil::ForceControllerSourcesVisitor removeVisitor(std::make_shared<NullAnimationTime>());
|
SceneUtil::ForceControllerSourcesVisitor removeVisitor(std::make_shared<NullAnimationTime>());
|
||||||
node->accept(removeVisitor);
|
node->accept(removeVisitor);
|
||||||
}
|
}
|
||||||
|
@ -345,9 +346,7 @@ namespace MWRender
|
||||||
if (mesh.empty() || boneName.empty())
|
if (mesh.empty() || boneName.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// If the scabbard is not found, use a weapon mesh as fallback.
|
// If the scabbard is not found, use the 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.
|
|
||||||
scabbardName = scabbardName.replace(scabbardName.size() - 4, 4, "_sh.nif");
|
scabbardName = scabbardName.replace(scabbardName.size() - 4, 4, "_sh.nif");
|
||||||
bool isEnchanted = !weapon->getClass().getEnchantment(*weapon).empty();
|
bool isEnchanted = !weapon->getClass().getEnchantment(*weapon).empty();
|
||||||
if (!mResourceSystem->getVFS()->exists(scabbardName))
|
if (!mResourceSystem->getVFS()->exists(scabbardName))
|
||||||
|
|
|
@ -168,7 +168,7 @@ namespace MWRender
|
||||||
if (slot == MWWorld::InventoryStore::Slot_CarriedRight)
|
if (slot == MWWorld::InventoryStore::Slot_CarriedRight)
|
||||||
source = mWeaponAnimationTime;
|
source = mWeaponAnimationTime;
|
||||||
else
|
else
|
||||||
source = std::make_shared<NullAnimationTime>();
|
source = mAnimationTimePtr[0];
|
||||||
|
|
||||||
SceneUtil::AssignControllerSourcesVisitor assignVisitor(source);
|
SceneUtil::AssignControllerSourcesVisitor assignVisitor(source);
|
||||||
attached->accept(assignVisitor);
|
attached->accept(assignVisitor);
|
||||||
|
|
|
@ -842,7 +842,7 @@ namespace MWRender
|
||||||
if (type == ESM::PRT_Weapon)
|
if (type == ESM::PRT_Weapon)
|
||||||
src = mWeaponAnimationTime;
|
src = mWeaponAnimationTime;
|
||||||
else
|
else
|
||||||
src = std::make_shared<NullAnimationTime>();
|
src = mAnimationTimePtr[0];
|
||||||
SceneUtil::AssignControllerSourcesVisitor assignVisitor(src);
|
SceneUtil::AssignControllerSourcesVisitor assignVisitor(src);
|
||||||
node->accept(assignVisitor);
|
node->accept(assignVisitor);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue