mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-02 14:57:59 +03:00
Sleep interruption fix
This commit is contained in:
parent
ddc8896dc6
commit
1b41f6c4c5
1 changed files with 1 additions and 1 deletions
|
@ -157,7 +157,7 @@ namespace MWGui
|
||||||
// figure out if player will be woken while sleeping
|
// figure out if player will be woken while sleeping
|
||||||
int x = OEngine::Misc::Rng::rollDice(hoursToWait);
|
int x = OEngine::Misc::Rng::rollDice(hoursToWait);
|
||||||
float fSleepRandMod = world->getStore().get<ESM::GameSetting>().find("fSleepRandMod")->getFloat();
|
float fSleepRandMod = world->getStore().get<ESM::GameSetting>().find("fSleepRandMod")->getFloat();
|
||||||
if (x > fSleepRandMod * hoursToWait)
|
if (x < fSleepRandMod * hoursToWait)
|
||||||
{
|
{
|
||||||
float fSleepRestMod = world->getStore().get<ESM::GameSetting>().find("fSleepRestMod")->getFloat();
|
float fSleepRestMod = world->getStore().get<ESM::GameSetting>().find("fSleepRestMod")->getFloat();
|
||||||
mInterruptAt = hoursToWait - int(fSleepRestMod * hoursToWait);
|
mInterruptAt = hoursToWait - int(fSleepRestMod * hoursToWait);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue