1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-23 18:41:36 +00:00

Fix mod not increasing fortified values

This commit is contained in:
Evil Eye 2022-02-10 20:46:20 +01:00
parent dc495a685a
commit 6b203892fc
2 changed files with 3 additions and 3 deletions

View file

@ -255,7 +255,7 @@ namespace MWMechanics
for (int i=0; i<3; ++i) for (int i=0; i<3; ++i)
{ {
DynamicStat<float> stat = creatureStats.getDynamic (i); DynamicStat<float> stat = creatureStats.getDynamic (i);
stat.setCurrent(stat.getModified()); stat.setCurrent (stat.getModified());
creatureStats.setDynamic (i, stat); creatureStats.setDynamic (i, stat);
} }

View file

@ -219,7 +219,7 @@ namespace MWScript
.getDynamic (mIndex)); .getDynamic (mIndex));
stat.setBase(value); stat.setBase(value);
stat.setCurrent(value, true); stat.setCurrent(stat.getModified(false), true, true);
ptr.getClass().getCreatureStats (ptr).setDynamic (mIndex, stat); ptr.getClass().getCreatureStats (ptr).setDynamic (mIndex, stat);
} }
@ -268,7 +268,7 @@ namespace MWScript
if(mIndex != 2) if(mIndex != 2)
base = std::max(base, 0.f); base = std::max(base, 0.f);
stat.setBase(base); stat.setBase(base);
stat.setCurrent(diff + current, true); stat.setCurrent(diff + current, true, true);
stats.setDynamic (mIndex, stat); stats.setDynamic (mIndex, stat);
} }