mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-30 16:20:21 +00:00
Merge branch 'master' into 'master'
Fixes issue with magic visual effects (bug #5060) See merge request OpenMW/openmw!125
This commit is contained in:
commit
8d1cad8462
@ -102,6 +102,7 @@
|
|||||||
Bug #5047: # in cell names sets color
|
Bug #5047: # in cell names sets color
|
||||||
Bug #5050: Invalid spell effects are not handled gracefully
|
Bug #5050: Invalid spell effects are not handled gracefully
|
||||||
Bug #5056: Calling Cast function on player doesn't equip the spell but casts it
|
Bug #5056: Calling Cast function on player doesn't equip the spell but casts it
|
||||||
|
Bug #5060: Magic effect visuals stop when death animation begins instead of when it ends
|
||||||
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
|
||||||
|
@ -551,7 +551,7 @@ namespace MWMechanics
|
|||||||
void Actors::adjustMagicEffects (const MWWorld::Ptr& creature)
|
void Actors::adjustMagicEffects (const MWWorld::Ptr& creature)
|
||||||
{
|
{
|
||||||
CreatureStats& creatureStats = creature.getClass().getCreatureStats (creature);
|
CreatureStats& creatureStats = creature.getClass().getCreatureStats (creature);
|
||||||
if (creatureStats.isDead())
|
if (creatureStats.isDeathAnimationFinished())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MagicEffects now = creatureStats.getSpells().getMagicEffects();
|
MagicEffects now = creatureStats.getSpells().getMagicEffects();
|
||||||
@ -1665,10 +1665,6 @@ namespace MWMechanics
|
|||||||
stats.getActiveSpells().visitEffectSources(soulTrap);
|
stats.getActiveSpells().visitEffectSources(soulTrap);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset magic effects and recalculate derived effects
|
|
||||||
// One case where we need this is to make sure bound items are removed upon death
|
|
||||||
stats.modifyMagicEffects(MWMechanics::MagicEffects());
|
|
||||||
stats.getActiveSpells().clear();
|
|
||||||
calculateCreatureStatModifiers(iter->first, 0);
|
calculateCreatureStatModifiers(iter->first, 0);
|
||||||
|
|
||||||
if (cls.isEssential(iter->first))
|
if (cls.isEssential(iter->first))
|
||||||
@ -1680,6 +1676,10 @@ namespace MWMechanics
|
|||||||
|
|
||||||
++mDeathCount[Misc::StringUtils::lowerCase(iter->first.getCellRef().getRefId())];
|
++mDeathCount[Misc::StringUtils::lowerCase(iter->first.getCellRef().getRefId())];
|
||||||
|
|
||||||
|
// Reset magic effects and recalculate derived effects
|
||||||
|
// One case where we need this is to make sure bound items are removed upon death
|
||||||
|
stats.modifyMagicEffects(MWMechanics::MagicEffects());
|
||||||
|
stats.getActiveSpells().clear();
|
||||||
// Make sure spell effects are removed
|
// Make sure spell effects are removed
|
||||||
purgeSpellEffects(stats.getActorId());
|
purgeSpellEffects(stats.getActorId());
|
||||||
|
|
||||||
|
@ -2648,7 +2648,7 @@ void CharacterController::updateContinuousVfx()
|
|||||||
|
|
||||||
for (std::vector<int>::iterator it = effects.begin(); it != effects.end(); ++it)
|
for (std::vector<int>::iterator it = effects.begin(); it != effects.end(); ++it)
|
||||||
{
|
{
|
||||||
if (mPtr.getClass().getCreatureStats(mPtr).isDead()
|
if (mPtr.getClass().getCreatureStats(mPtr).isDeathAnimationFinished()
|
||||||
|| mPtr.getClass().getCreatureStats(mPtr).getMagicEffects().get(MWMechanics::EffectKey(*it)).getMagnitude() <= 0)
|
|| mPtr.getClass().getCreatureStats(mPtr).getMagicEffects().get(MWMechanics::EffectKey(*it)).getMagnitude() <= 0)
|
||||||
mAnimation->removeEffect(*it);
|
mAnimation->removeEffect(*it);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user