1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00

Don't trigger dynamic stats recalculation when setting up actor initial stats (Fixes #1927)

This caused the magicka value set in the CS to be ignored completely, so flame atronachs were spawning with 50 magicka instead of 105.
This commit is contained in:
scrawl 2014-09-18 03:47:45 +02:00
parent 447e93bdb4
commit be7839873a
4 changed files with 10 additions and 0 deletions

View File

@ -129,6 +129,8 @@ namespace MWClass
data->mCreatureStats.setGoldPool(ref->mBase->mData.mGold);
data->mCreatureStats.setNeedRecalcDynamicStats(false);
// store
ptr.getRefData().setCustomData(data.release());

View File

@ -388,6 +388,8 @@ namespace MWClass
data->mNpcStats.setGoldPool(gold);
data->mNpcStats.setNeedRecalcDynamicStats(false);
// store
ptr.getRefData().setCustomData (data.release());

View File

@ -378,6 +378,11 @@ namespace MWMechanics
return false;
}
void CreatureStats::setNeedRecalcDynamicStats(bool val)
{
mRecalcDynamicStats = val;
}
void CreatureStats::setKnockedDown(bool value)
{
mKnockdown = value;

View File

@ -92,6 +92,7 @@ namespace MWMechanics
void setAttackStrength(float value);
bool needToRecalcDynamicStats();
void setNeedRecalcDynamicStats(bool val);
void addToFallHeight(float height);