From be12d241da2aeeba92298e05e321cae1b78fb3d9 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Wed, 20 Mar 2019 12:19:35 +0400 Subject: [PATCH] Reset current attack during force update (bug #4922) --- CHANGELOG.md | 1 + apps/openmw/mwmechanics/character.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e56632db7..86eb3712e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ Bug #4896: Title screen music doesn't loop Bug #4911: Editor: QOpenGLContext::swapBuffers() warning with Qt5 Bug #4916: Specular power (shininess) material parameter is ignored when shaders are used. + Bug #4922: Werewolves can not attack if the transformation happens during attack Feature #2229: Improve pathfinding AI Feature #3442: Default values for fallbacks from ini file Feature #3610: Option to invert X axis diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index d1f8562f4..ffbf5dd09 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -2554,6 +2554,13 @@ void CharacterController::forceStateUpdate() return; clearAnimQueue(); + // Make sure we canceled the current attack or spellcasting, + // because we disabled attack animations anyway. + mCastingManualSpell = false; + mAttackingOrSpell = false; + if (mUpperBodyState != UpperCharState_Nothing) + mUpperBodyState = UpperCharState_WeapEquiped; + refreshCurrentAnims(mIdleState, mMovementState, mJumpState, true); if(mDeathState != CharState_None)