Sleep interruption fix

c++11
scrawl 10 years ago
parent ddc8896dc6
commit 1b41f6c4c5

@ -157,7 +157,7 @@ namespace MWGui
// figure out if player will be woken while sleeping
int x = OEngine::Misc::Rng::rollDice(hoursToWait);
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();
mInterruptAt = hoursToWait - int(fSleepRestMod * hoursToWait);

Loading…
Cancel
Save