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.
deque
scrawl 10 years ago
parent 447e93bdb4
commit be7839873a

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

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

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

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

Loading…
Cancel
Save