1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-12-17 16:43:08 +00:00

Allow weapon equip/unequip animations to intersect (#7886)

This commit is contained in:
Alexei Kotov 2024-03-15 09:57:36 +03:00
parent 7dcd127295
commit 974415addf
2 changed files with 15 additions and 8 deletions

View file

@ -158,6 +158,7 @@
Bug #7841: Editor: "Dirty" water heights are saved in modified CELLs Bug #7841: Editor: "Dirty" water heights are saved in modified CELLs
Bug #7859: AutoCalc flag is not used to calculate potion value Bug #7859: AutoCalc flag is not used to calculate potion value
Bug #7872: Region sounds use wrong odds Bug #7872: Region sounds use wrong odds
Bug #7886: Equip and unequip animations can't share the animation track section
Bug #7887: Editor: Mismatched reported script data size and actual data size causes a crash during save Bug #7887: Editor: Mismatched reported script data size and actual data size causes a crash during save
Feature #2566: Handle NAM9 records for manual cell references Feature #2566: Handle NAM9 records for manual cell references
Feature #3537: Shader-based water ripples Feature #3537: Shader-based water ripples

View file

@ -1059,19 +1059,25 @@ namespace MWMechanics
std::string_view action = evt.substr(groupname.size() + 2); std::string_view action = evt.substr(groupname.size() + 2);
if (action == "equip attach") if (action == "equip attach")
{
if (mUpperBodyState == UpperBodyState::Equipping)
{ {
if (groupname == "shield") if (groupname == "shield")
mAnimation->showCarriedLeft(true); mAnimation->showCarriedLeft(true);
else else
mAnimation->showWeapons(true); mAnimation->showWeapons(true);
} }
}
else if (action == "unequip detach") else if (action == "unequip detach")
{
if (mUpperBodyState == UpperBodyState::Unequipping)
{ {
if (groupname == "shield") if (groupname == "shield")
mAnimation->showCarriedLeft(false); mAnimation->showCarriedLeft(false);
else else
mAnimation->showWeapons(false); mAnimation->showWeapons(false);
} }
}
else if (action == "chop hit" || action == "slash hit" || action == "thrust hit" || action == "hit") else if (action == "chop hit" || action == "slash hit" || action == "thrust hit" || action == "hit")
{ {
int attackType = -1; int attackType = -1;