mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 12:35:46 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
353d6973e2
@ -10,7 +10,21 @@ namespace ESSImport
|
|||||||
void ActorData::load(ESM::ESMReader &esm)
|
void ActorData::load(ESM::ESMReader &esm)
|
||||||
{
|
{
|
||||||
if (esm.isNextSub("ACTN"))
|
if (esm.isNextSub("ACTN"))
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Activation flags:
|
||||||
|
ActivationFlag_UseEnabled = 1
|
||||||
|
ActivationFlag_OnActivate = 2
|
||||||
|
ActivationFlag_OnDeath = 10h
|
||||||
|
ActivationFlag_OnKnockout = 20h
|
||||||
|
ActivationFlag_OnMurder = 40h
|
||||||
|
ActivationFlag_DoorOpening = 100h
|
||||||
|
ActivationFlag_DoorClosing = 200h
|
||||||
|
ActivationFlag_DoorJammedOpening = 400h
|
||||||
|
ActivationFlag_DoorJammedClosing = 800h
|
||||||
|
*/
|
||||||
esm.skipHSub();
|
esm.skipHSub();
|
||||||
|
}
|
||||||
|
|
||||||
if (esm.isNextSub("STPR"))
|
if (esm.isNextSub("STPR"))
|
||||||
esm.skipHSub();
|
esm.skipHSub();
|
||||||
|
@ -158,11 +158,15 @@ 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 < static_cast<int>(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);
|
int interruptAtHoursRemaining = int(fSleepRestMod * hoursToWait);
|
||||||
mInterruptCreatureList = region->mSleepList;
|
if (interruptAtHoursRemaining != 0)
|
||||||
|
{
|
||||||
|
mInterruptAt = hoursToWait - interruptAtHoursRemaining;
|
||||||
|
mInterruptCreatureList = region->mSleepList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user