mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
Use the correct formula for NPC health initialization
This commit is contained in:
parent
2356e6218e
commit
1c330fc899
1 changed files with 2 additions and 1 deletions
|
@ -110,9 +110,10 @@ namespace
|
||||||
+ static_cast<int>((level-1) * modifierSum+0.5), 100) );
|
+ static_cast<int>((level-1) * modifierSum+0.5), 100) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// initial health
|
||||||
int strength = creatureStats.getAttribute(ESM::Attribute::Strength).getBase();
|
int strength = creatureStats.getAttribute(ESM::Attribute::Strength).getBase();
|
||||||
int endurance = creatureStats.getAttribute(ESM::Attribute::Endurance).getBase();
|
int endurance = creatureStats.getAttribute(ESM::Attribute::Endurance).getBase();
|
||||||
creatureStats.setHealth(static_cast<int> (0.5 * (strength + endurance)) + creatureStats.getLevelHealthBonus());
|
creatureStats.setHealth(static_cast<int> (0.5 * (strength + endurance)) + 4 * (creatureStats.getLevel() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue