forked from mirror/openmw-tes3mp
Use fVanityDelay
This commit is contained in:
parent
c6421276bd
commit
899214a906
1 changed files with 3 additions and 1 deletions
|
@ -831,9 +831,11 @@ namespace MWInput
|
||||||
|
|
||||||
void InputManager::updateIdleTime(float dt)
|
void InputManager::updateIdleTime(float dt)
|
||||||
{
|
{
|
||||||
|
static const float vanityDelay = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()
|
||||||
|
.find("fVanityDelay")->getFloat();
|
||||||
if (mTimeIdle >= 0.f)
|
if (mTimeIdle >= 0.f)
|
||||||
mTimeIdle += dt;
|
mTimeIdle += dt;
|
||||||
if (mTimeIdle > 30.f) {
|
if (mTimeIdle > vanityDelay) {
|
||||||
MWBase::Environment::get().getWorld()->toggleVanityMode(true);
|
MWBase::Environment::get().getWorld()->toggleVanityMode(true);
|
||||||
mTimeIdle = -1.f;
|
mTimeIdle = -1.f;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue