mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-11-04 00:26:45 +00:00 
			
		
		
		
	Merged pull request #1933
This commit is contained in:
		
						commit
						84a2752db9
					
				
					 2 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -126,6 +126,7 @@
 | 
			
		|||
    Bug #4633: Sneaking stance affects speed even if the actor is not able to crouch
 | 
			
		||||
    Bug #4641: GetPCJumping is handled incorrectly
 | 
			
		||||
    Bug #4644: %Name should be available for all actors, not just for NPCs
 | 
			
		||||
    Bug #4648: Hud thinks that throwing weapons have condition
 | 
			
		||||
    Bug #4649: Levelup fully restores health
 | 
			
		||||
    Feature #912: Editor: Add missing icons to UniversalId tables
 | 
			
		||||
    Feature #1617: Editor: Enchantment effect record verifier
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1383,8 +1383,11 @@ namespace MWGui
 | 
			
		|||
    void WindowManager::setSelectedWeapon(const MWWorld::Ptr& item)
 | 
			
		||||
    {
 | 
			
		||||
        mSelectedWeapon = item;
 | 
			
		||||
        int durabilityPercent =
 | 
			
		||||
             static_cast<int>(item.getClass().getItemHealth(item) / static_cast<float>(item.getClass().getItemMaxHealth(item)) * 100);
 | 
			
		||||
        int durabilityPercent = 100;
 | 
			
		||||
        if (item.getClass().hasItemHealth(item))
 | 
			
		||||
        {
 | 
			
		||||
            durabilityPercent = static_cast<int>(item.getClass().getItemHealth(item) / static_cast<float>(item.getClass().getItemMaxHealth(item)) * 100);
 | 
			
		||||
        }
 | 
			
		||||
        mHud->setSelectedWeapon(item, durabilityPercent);
 | 
			
		||||
        mInventoryWindow->setTitle(item.getClass().getName(item));
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue