mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Issue #68: stop NPCs from instantly dropping dead
This commit is contained in:
parent
0547f11564
commit
9172c3ec4d
@ -98,6 +98,13 @@ namespace MWClass
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/// \todo do something with mNpdt12 maybe:p
|
/// \todo do something with mNpdt12 maybe:p
|
||||||
|
for (int i=0; i<8; ++i)
|
||||||
|
data->mCreatureStats.getAttribute (i).set (10);
|
||||||
|
|
||||||
|
for (int i=0; i<3; ++i)
|
||||||
|
data->mCreatureStats.setDynamic (i, 10);
|
||||||
|
|
||||||
|
data->mCreatureStats.setLevel (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
data->mCreatureStats.setHello(ref->base->mAiData.mHello);
|
data->mCreatureStats.setHello(ref->base->mAiData.mHello);
|
||||||
|
@ -24,8 +24,8 @@ namespace MWMechanics
|
|||||||
{
|
{
|
||||||
// magic effects
|
// magic effects
|
||||||
adjustMagicEffects (ptr);
|
adjustMagicEffects (ptr);
|
||||||
calculateCreatureStatModifiers (ptr);
|
|
||||||
calculateDynamicStats (ptr);
|
calculateDynamicStats (ptr);
|
||||||
|
calculateCreatureStatModifiers (ptr);
|
||||||
|
|
||||||
// AI
|
// AI
|
||||||
CreatureStats& creatureStats = MWWorld::Class::get (ptr).getCreatureStats (ptr);
|
CreatureStats& creatureStats = MWWorld::Class::get (ptr).getCreatureStats (ptr);
|
||||||
|
@ -173,9 +173,9 @@ namespace MWMechanics
|
|||||||
{
|
{
|
||||||
if (index < 0 || index > 2)
|
if (index < 0 || index > 2)
|
||||||
throw std::runtime_error("dynamic stat index is out of range");
|
throw std::runtime_error("dynamic stat index is out of range");
|
||||||
|
|
||||||
mDynamic[index] = value;
|
mDynamic[index] = value;
|
||||||
|
|
||||||
if (index==2 && mDynamic[index].getCurrent()<1)
|
if (index==2 && mDynamic[index].getCurrent()<1)
|
||||||
mDead = true;
|
mDead = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user