mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 00:32:49 +00:00
Merge branch 'oopsy' into 'master'
Expect recent saves to store the modified value Closes #6604 See merge request OpenMW/openmw!1649
This commit is contained in:
commit
c1cd3ba9a1
@ -21,13 +21,13 @@ namespace MWMechanics
|
||||
void Stat<T>::writeState (ESM::StatState<T>& state) const
|
||||
{
|
||||
state.mBase = mBase;
|
||||
state.mMod = mModifier;
|
||||
state.mMod = mModifier + mBase;
|
||||
}
|
||||
template<typename T>
|
||||
void Stat<T>::readState (const ESM::StatState<T>& state)
|
||||
{
|
||||
mBase = state.mBase;
|
||||
mModifier = state.mMod;
|
||||
mModifier = state.mMod - mBase;
|
||||
}
|
||||
|
||||
|
||||
|
@ -201,10 +201,10 @@ namespace MWWorld
|
||||
{
|
||||
auto& dynamic = creatureStats.mDynamic[i];
|
||||
dynamic.mCurrent -= dynamic.mMod - dynamic.mBase;
|
||||
dynamic.mMod = 0.f;
|
||||
dynamic.mMod = dynamic.mBase;
|
||||
}
|
||||
for(std::size_t i = 0; i < 4; ++i)
|
||||
creatureStats.mAiSettings[i].mMod = 0.f;
|
||||
creatureStats.mAiSettings[i].mMod = creatureStats.mAiSettings[i].mBase;
|
||||
if(npcStats)
|
||||
{
|
||||
for(std::size_t i = 0; i < ESM::Skill::Length; ++i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user