mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 01:26:39 +00:00 
			
		
		
		
	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))
 | 
			
		||||
        {
 | 
			
		||||
            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);
 | 
			
		||||
                mUpperBodyState = UpperCharState_WeapEquiped;
 | 
			
		||||
| 
						 | 
				
			
			@ -522,8 +522,8 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
 | 
			
		|||
            mIdleState = CharState_Idle;
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            /* FIXME: Get the actual death state used. */
 | 
			
		||||
            mDeathState = CharState_Death1;
 | 
			
		||||
            int deathindex = mPtr.getClass().getCreatureStats(mPtr).getDeathAnimation();
 | 
			
		||||
            playDeath(1.0f, CharacterState(CharState_Death1 + deathindex));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
| 
						 | 
				
			
			@ -535,12 +535,7 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    if(mDeathState != CharState_None)
 | 
			
		||||
    {
 | 
			
		||||
        int deathindex = mPtr.getClass().getCreatureStats(mPtr).getDeathAnimation();
 | 
			
		||||
        playDeath(1.0f, CharacterState(CharState_Death1 + deathindex));
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
    if(mDeathState == CharState_None)
 | 
			
		||||
        refreshCurrentAnims(mIdleState, mMovementState, true);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue