Reset current attack during force update (bug #4922)

pull/2270/head
Andrei Kortunov 5 years ago
parent e171d34192
commit be12d241da

@ -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

@ -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)

Loading…
Cancel
Save