Reset skills of dead actors (bug #5328)

pull/578/head
Capostrophic 5 years ago
parent 4c5d2feee8
commit 04ebe5c4c9

@ -207,6 +207,7 @@
Bug #5300: NPCs don't switch from torch to shield when starting combat
Bug #5308: World map copying makes save loading much slower
Bug #5313: Node properties of identical type are not applied in the correct order
Bug #5328: Skills aren't properly reset for dead actors
Feature #1774: Handle AvoidNode
Feature #2229: Improve pathfinding AI
Feature #3025: Analogue gamepad movement controls

@ -1850,6 +1850,8 @@ namespace MWMechanics
stats.getActiveSpells().visitEffectSources(soulTrap);
}
// Magic effects will be reset later, and the magic effect that could kill the actor
// needs to be determined now
calculateCreatureStatModifiers(iter->first, 0);
if (cls.isEssential(iter->first))
@ -1867,7 +1869,9 @@ namespace MWMechanics
// Make sure spell effects are removed
purgeSpellEffects(stats.getActorId());
// Reset dynamic stats, attributes and skills
calculateCreatureStatModifiers(iter->first, 0);
calculateNpcStatModifiers(iter->first, 0);
if( iter->first == getPlayer())
{

Loading…
Cancel
Save