1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 18:32:36 +00:00

Remove mOverencumberedMessageDelay

This commit is contained in:
kuyondo 2021-11-24 19:39:22 +08:00
parent 30ff688c70
commit 11925b17ea
2 changed files with 1 additions and 9 deletions

View File

@ -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}");
}
}

View File

@ -67,7 +67,6 @@ namespace MWInput
bool mSneaking;
bool mAttemptJump;
float mOverencumberedMessageDelay;
float mTimeIdle;
};
}