Make enchanted item casting use accurate aiming for 1 frame (bug #6909)

check_span
Alexei Kotov 2 years ago
parent c54822acf9
commit 16e373f30e

@ -135,6 +135,7 @@
Bug #6895: Removing a negative number of items from a script, makes the script terminate with an error
Bug #6898: Accessing the Quick Inventory menu does not work while in menu mode
Bug #6901: Morrowind.exe soul gem usage discrepancy
Bug #6909: Using enchanted items has no animation
Feature #890: OpenMW-CS: Column filtering
Feature #1465: "Reset" argument for AI functions
Feature #2491: Ability to make OpenMW "portable"

@ -1400,6 +1400,7 @@ bool CharacterController::updateState(CharacterState idle)
// Enchanted items by default do not use casting animations
world->castSpell(mPtr);
resetIdle = false;
mUpperBodyState = UpperCharState_CastingSpell;
}
else if(!spellid.empty() && canCast)
{
@ -1565,7 +1566,8 @@ bool CharacterController::updateState(CharacterState idle)
resetCurrentIdleState();
}
animPlaying = mAnimation->getInfo(mCurrentWeapon, &complete);
// Spellcasting animation needs to "play" for at least one frame to reset the aiming factor
animPlaying = mAnimation->getInfo(mCurrentWeapon, &complete) || mUpperBodyState == UpperCharState_CastingSpell;
if(mUpperBodyState == UpperCharState_MinAttackToMaxAttack && !isKnockedDown())
mAttackStrength = complete;
}

Loading…
Cancel
Save