mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:53:52 +00:00
Merge pull request #1972 from akortunov/equipfix
Force actor to the 'weapon equipped' state if the weapon disappeared in the middle of attack
This commit is contained in:
commit
6c4116cc8b
2 changed files with 13 additions and 0 deletions
|
@ -130,6 +130,7 @@
|
||||||
Bug #4633: Sneaking stance affects speed even if the actor is not able to crouch
|
Bug #4633: Sneaking stance affects speed even if the actor is not able to crouch
|
||||||
Bug #4641: GetPCJumping is handled incorrectly
|
Bug #4641: GetPCJumping is handled incorrectly
|
||||||
Bug #4644: %Name should be available for all actors, not just for NPCs
|
Bug #4644: %Name should be available for all actors, not just for NPCs
|
||||||
|
Bug #4646: Weapon force-equipment messes up ongoing attack animations
|
||||||
Bug #4648: Hud thinks that throwing weapons have condition
|
Bug #4648: Hud thinks that throwing weapons have condition
|
||||||
Bug #4649: Levelup fully restores health
|
Bug #4649: Levelup fully restores health
|
||||||
Bug #4653: Length of non-ASCII strings is handled incorrectly in ESM reader
|
Bug #4653: Length of non-ASCII strings is handled incorrectly in ESM reader
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue