mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-09 21:44:54 +00:00
Merge branch 'more_magical_stamina' into 'master'
Make fatigue and magicka recalculation behave the same way Closes #6107 See merge request OpenMW/openmw!968
This commit is contained in:
commit
7cc4e5afa1
@ -10,6 +10,7 @@
|
|||||||
Bug #6066: addtopic "return" does not work from within script. No errors thrown
|
Bug #6066: addtopic "return" does not work from within script. No errors thrown
|
||||||
Bug #6067: esp loader fails in for certain subrecord orders
|
Bug #6067: esp loader fails in for certain subrecord orders
|
||||||
Bug #6101: Disarming trapped unlocked owned objects isn't considered a crime
|
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
|
Bug #6115: Showmap overzealous matching
|
||||||
Bug #6129: Player avatar not displayed correctly for large window sizes when GUI scaling active
|
Bug #6129: Player avatar not displayed correctly for large window sizes when GUI scaling active
|
||||||
Bug #6131: Item selection in the avatar window not working correctly for large window sizes
|
Bug #6131: Item selection in the avatar window not working correctly for large window sizes
|
||||||
|
@ -826,7 +826,7 @@ namespace MWMechanics
|
|||||||
|
|
||||||
DynamicStat<float> magicka = creatureStats.getMagicka();
|
DynamicStat<float> magicka = creatureStats.getMagicka();
|
||||||
float diff = (static_cast<int>(magickaFactor*intelligence)) - magicka.getBase();
|
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.setModified(magicka.getModified() + diff, 0);
|
||||||
magicka.setCurrent(magicka.getBase() * currentToBaseRatio, false, true);
|
magicka.setCurrent(magicka.getBase() * currentToBaseRatio, false, true);
|
||||||
creatureStats.setMagicka(magicka);
|
creatureStats.setMagicka(magicka);
|
||||||
|
@ -159,7 +159,7 @@ namespace MWMechanics
|
|||||||
float diff = (strength+willpower+agility+endurance) - fatigue.getBase();
|
float diff = (strength+willpower+agility+endurance) - fatigue.getBase();
|
||||||
float currentToBaseRatio = fatigue.getBase() > 0 ? (fatigue.getCurrent() / fatigue.getBase()) : 0;
|
float currentToBaseRatio = fatigue.getBase() > 0 ? (fatigue.getCurrent() / fatigue.getBase()) : 0;
|
||||||
fatigue.setModified(fatigue.getModified() + diff, 0);
|
fatigue.setModified(fatigue.getModified() + diff, 0);
|
||||||
fatigue.setCurrent(fatigue.getBase() * currentToBaseRatio);
|
fatigue.setCurrent(fatigue.getBase() * currentToBaseRatio, false, true);
|
||||||
setFatigue(fatigue);
|
setFatigue(fatigue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user