|
|
@ -1278,6 +1278,18 @@ bool CharacterController::updateWeaponState(CharacterState& idle)
|
|
|
|
bool isStillWeapon = weaptype > WeapType_HandToHand && weaptype < WeapType_Spell &&
|
|
|
|
bool isStillWeapon = weaptype > WeapType_HandToHand && weaptype < WeapType_Spell &&
|
|
|
|
mWeaponType > WeapType_HandToHand && mWeaponType < WeapType_Spell;
|
|
|
|
mWeaponType > WeapType_HandToHand && mWeaponType < WeapType_Spell;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// If the current weapon type was changed in the middle of attack (e.g. by Equip console command or when bound spell expires),
|
|
|
|
|
|
|
|
// we should force actor to the "weapon equipped" state, interrupt attack and update animations.
|
|
|
|
|
|
|
|
if (isStillWeapon && mWeaponType != weaptype && mUpperBodyState > UpperCharState_WeapEquiped)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
forcestateupdate = true;
|
|
|
|
|
|
|
|
mUpperBodyState = UpperCharState_WeapEquiped;
|
|
|
|
|
|
|
|
mAttackingOrSpell = false;
|
|
|
|
|
|
|
|
mAnimation->disable(mCurrentWeapon);
|
|
|
|
|
|
|
|
if (mPtr == getPlayer())
|
|
|
|
|
|
|
|
MWBase::Environment::get().getWorld()->getPlayer().setAttackingOrSpell(false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(!isKnockedOut() && !isKnockedDown() && !isRecovery())
|
|
|
|
if(!isKnockedOut() && !isKnockedDown() && !isRecovery())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::string weapgroup;
|
|
|
|
std::string weapgroup;
|
|
|
|