mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 17:53:53 +00:00
Adjust the sleep interruption chance (Fixes #2781)
This commit is contained in:
parent
d76fb2d266
commit
c57e72fe03
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 = Misc::Rng::rollDice(hoursToWait);
|
int x = 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 < static_cast<int>(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…
Reference in a new issue