forked from mirror/openmw-tes3mp
Merge pull request #1612
This commit is contained in:
commit
56613d817e
2 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,7 @@
|
|||
#include "companionwindow.hpp"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <MyGUI_InputManager.h>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
@ -129,7 +131,7 @@ void CompanionWindow::updateEncumbranceBar()
|
|||
return;
|
||||
float capacity = mPtr.getClass().getCapacity(mPtr);
|
||||
float encumbrance = mPtr.getClass().getEncumbrance(mPtr);
|
||||
mEncumbranceBar->setValue(static_cast<int>(encumbrance), static_cast<int>(capacity));
|
||||
mEncumbranceBar->setValue(std::ceil(encumbrance), static_cast<int>(capacity));
|
||||
|
||||
if (mModel && mModel->hasProfit(mPtr))
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "inventorywindow.hpp"
|
||||
|
||||
#include <cmath>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <MyGUI_Window.h>
|
||||
|
@ -598,7 +599,7 @@ namespace MWGui
|
|||
float capacity = player.getClass().getCapacity(player);
|
||||
float encumbrance = player.getClass().getEncumbrance(player);
|
||||
mTradeModel->adjustEncumbrance(encumbrance);
|
||||
mEncumbranceBar->setValue(static_cast<int>(encumbrance), static_cast<int>(capacity));
|
||||
mEncumbranceBar->setValue(std::ceil(encumbrance), static_cast<int>(capacity));
|
||||
}
|
||||
|
||||
void InventoryWindow::onFrame(float dt)
|
||||
|
|
Loading…
Reference in a new issue