1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Fix 'failed to find animation' warnings when a spell was equipped before the werewolf transformation

This commit is contained in:
scrawl 2015-12-26 18:45:09 +01:00
parent 6b67911658
commit 0bec6e5fbe

View file

@ -520,6 +520,8 @@ void getWeaponGroup(WeaponType weaptype, std::string &group)
const WeaponInfo *info = std::find_if(sWeaponTypeList, sWeaponTypeListEnd, FindWeaponType(weaptype));
if(info != sWeaponTypeListEnd)
group = info->longgroup;
else
group.clear();
}
@ -1091,6 +1093,8 @@ bool CharacterController::updateWeaponState()
std::string weapgroup;
if(weaptype == WeapType_None)
{
if ((!isWerewolf || mWeaponType != WeapType_Spell))
{
getWeaponGroup(mWeaponType, weapgroup);
mAnimation->play(weapgroup, priorityWeapon,
@ -1098,6 +1102,7 @@ bool CharacterController::updateWeaponState()
1.0f, "unequip start", "unequip stop", 0.0f, 0);
mUpperBodyState = UpperCharState_UnEquipingWeap;
}
}
else
{
getWeaponGroup(weaptype, weapgroup);