1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 16:29:55 +00:00

Merge pull request #2742 from Capostrophic/skills

Reset skills of dead actors (bug #5328)
This commit is contained in:
Andrei Kortunov 2020-03-26 16:50:48 +04:00 committed by GitHub
commit 60161e639c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -207,6 +207,7 @@
Bug #5300: NPCs don't switch from torch to shield when starting combat Bug #5300: NPCs don't switch from torch to shield when starting combat
Bug #5308: World map copying makes save loading much slower 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 #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 #1774: Handle AvoidNode
Feature #2229: Improve pathfinding AI Feature #2229: Improve pathfinding AI
Feature #3025: Analogue gamepad movement controls Feature #3025: Analogue gamepad movement controls

View file

@ -1850,6 +1850,8 @@ namespace MWMechanics
stats.getActiveSpells().visitEffectSources(soulTrap); 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); calculateCreatureStatModifiers(iter->first, 0);
if (cls.isEssential(iter->first)) if (cls.isEssential(iter->first))
@ -1867,7 +1869,9 @@ namespace MWMechanics
// Make sure spell effects are removed // Make sure spell effects are removed
purgeSpellEffects(stats.getActorId()); purgeSpellEffects(stats.getActorId());
// Reset dynamic stats, attributes and skills
calculateCreatureStatModifiers(iter->first, 0); calculateCreatureStatModifiers(iter->first, 0);
calculateNpcStatModifiers(iter->first, 0);
if( iter->first == getPlayer()) if( iter->first == getPlayer())
{ {