mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-26 06:40:22 +00:00
Make fatigue and magicka recalculation behave the same way
This commit is contained in:
parent
8bdce3ebef
commit
5e4beb217a
@ -8,6 +8,7 @@
|
||||
Bug #5483: AutoCalc flag is not used to calculate spells cost
|
||||
Bug #6066: addtopic "return" does not work from within script. No errors thrown
|
||||
Bug #6101: Disarming trapped unlocked owned objects isn't considered a crime
|
||||
Bug #6107: Fatigue is incorrectly recalculated when fortify effect is applied or removed
|
||||
Bug #6115: Showmap overzealous matching
|
||||
|
||||
0.47.0
|
||||
|
@ -826,7 +826,7 @@ namespace MWMechanics
|
||||
|
||||
DynamicStat<float> magicka = creatureStats.getMagicka();
|
||||
float diff = (static_cast<int>(magickaFactor*intelligence)) - magicka.getBase();
|
||||
float currentToBaseRatio = (magicka.getCurrent() / magicka.getBase());
|
||||
float currentToBaseRatio = magicka.getBase() > 0 ? magicka.getCurrent() / magicka.getBase() : 0;
|
||||
magicka.setModified(magicka.getModified() + diff, 0);
|
||||
magicka.setCurrent(magicka.getBase() * currentToBaseRatio, false, true);
|
||||
creatureStats.setMagicka(magicka);
|
||||
|
@ -159,7 +159,7 @@ namespace MWMechanics
|
||||
float diff = (strength+willpower+agility+endurance) - fatigue.getBase();
|
||||
float currentToBaseRatio = fatigue.getBase() > 0 ? (fatigue.getCurrent() / fatigue.getBase()) : 0;
|
||||
fatigue.setModified(fatigue.getModified() + diff, 0);
|
||||
fatigue.setCurrent(fatigue.getBase() * currentToBaseRatio);
|
||||
fatigue.setCurrent(fatigue.getBase() * currentToBaseRatio, false, true);
|
||||
setFatigue(fatigue);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user