forked from teamnwah/openmw-tes3coop
Fix weapon incorrectly showing when saving and loading with spell equipped
This commit is contained in:
parent
edccb62c1f
commit
9ea071c1e8
1 changed files with 4 additions and 9 deletions
|
@ -509,7 +509,7 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
|
||||||
if (cls.hasInventoryStore(mPtr))
|
if (cls.hasInventoryStore(mPtr))
|
||||||
{
|
{
|
||||||
getActiveWeapon(cls.getCreatureStats(mPtr), cls.getInventoryStore(mPtr), &mWeaponType);
|
getActiveWeapon(cls.getCreatureStats(mPtr), cls.getInventoryStore(mPtr), &mWeaponType);
|
||||||
if(mWeaponType != WeapType_None)
|
if(mWeaponType != WeapType_None && mWeaponType != WeapType_Spell && mWeaponType != WeapType_HandToHand)
|
||||||
{
|
{
|
||||||
getWeaponGroup(mWeaponType, mCurrentWeapon);
|
getWeaponGroup(mWeaponType, mCurrentWeapon);
|
||||||
mUpperBodyState = UpperCharState_WeapEquiped;
|
mUpperBodyState = UpperCharState_WeapEquiped;
|
||||||
|
@ -522,8 +522,8 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
|
||||||
mIdleState = CharState_Idle;
|
mIdleState = CharState_Idle;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* FIXME: Get the actual death state used. */
|
int deathindex = mPtr.getClass().getCreatureStats(mPtr).getDeathAnimation();
|
||||||
mDeathState = CharState_Death1;
|
playDeath(1.0f, CharacterState(CharState_Death1 + deathindex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -535,12 +535,7 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(mDeathState != CharState_None)
|
if(mDeathState == CharState_None)
|
||||||
{
|
|
||||||
int deathindex = mPtr.getClass().getCreatureStats(mPtr).getDeathAnimation();
|
|
||||||
playDeath(1.0f, CharacterState(CharState_Death1 + deathindex));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
refreshCurrentAnims(mIdleState, mMovementState, true);
|
refreshCurrentAnims(mIdleState, mMovementState, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue