mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 18:32:36 +00:00
Remove mOverencumberedMessageDelay
This commit is contained in:
parent
30ff688c70
commit
11925b17ea
@ -39,7 +39,6 @@ namespace MWInput
|
||||
, mAlwaysRunActive(Settings::Manager::getBool("always run", "Input"))
|
||||
, mSneaking(false)
|
||||
, mAttemptJump(false)
|
||||
, mOverencumberedMessageDelay(0.f)
|
||||
, mTimeIdle(0.f)
|
||||
{
|
||||
}
|
||||
@ -88,22 +87,16 @@ namespace MWInput
|
||||
{
|
||||
player.setUpDown(1);
|
||||
triedToMove = true;
|
||||
mOverencumberedMessageDelay = 0.f;
|
||||
}
|
||||
|
||||
// if player tried to start moving, but can't (due to being overencumbered), display a notification.
|
||||
if (triedToMove)
|
||||
{
|
||||
MWWorld::Ptr playerPtr = MWBase::Environment::get().getWorld ()->getPlayerPtr();
|
||||
mOverencumberedMessageDelay -= dt;
|
||||
if (playerPtr.getClass().getEncumbrance(playerPtr) > playerPtr.getClass().getCapacity(playerPtr))
|
||||
{
|
||||
player.setAutoMove (false);
|
||||
if (mOverencumberedMessageDelay <= 0)
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->messageBox("#{sNotifyMessage59}");
|
||||
mOverencumberedMessageDelay = 1.0;
|
||||
}
|
||||
MWBase::Environment::get().getWindowManager()->messageBox("#{sNotifyMessage59}");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,6 @@ namespace MWInput
|
||||
bool mSneaking;
|
||||
bool mAttemptJump;
|
||||
|
||||
float mOverencumberedMessageDelay;
|
||||
float mTimeIdle;
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user