From 744667e163d5ae8898578a9584d76c0c4ed4b27f Mon Sep 17 00:00:00 2001 From: MiroslavR Date: Mon, 19 Sep 2016 00:05:50 +0200 Subject: [PATCH 1/3] Don't use base invisibility magnitude for setting alpha (Fixes #3555) --- apps/openmw/mwmechanics/character.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index fb1662a4a..d993b1301 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -2167,7 +2167,7 @@ void CharacterController::updateMagicEffects() if (!mPtr.getClass().isActor()) return; float alpha = 1.f; - if (mPtr.getClass().getCreatureStats(mPtr).getMagicEffects().get(ESM::MagicEffect::Invisibility).getMagnitude()) + if (mPtr.getClass().getCreatureStats(mPtr).getMagicEffects().get(ESM::MagicEffect::Invisibility).getModifier()) // Ignore base magnitude (see bug #3555). { if (mPtr == getPlayer()) alpha = 0.4f; From d1157b3e10f85c7809902f24860f697299059920 Mon Sep 17 00:00:00 2001 From: Allofich Date: Mon, 19 Sep 2016 18:12:30 +0900 Subject: [PATCH 2/3] Use correct vfx for teleport spells --- apps/openmw/mwmechanics/spellcasting.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/apps/openmw/mwmechanics/spellcasting.cpp b/apps/openmw/mwmechanics/spellcasting.cpp index 95a7e1a3b..b5b409bee 100644 --- a/apps/openmw/mwmechanics/spellcasting.cpp +++ b/apps/openmw/mwmechanics/spellcasting.cpp @@ -646,14 +646,28 @@ namespace MWMechanics if (target != getPlayer()) return false; + MWRender::Animation* anim = MWBase::Environment::get().getWorld()->getAnimation(mCaster); + if (effectId == ESM::MagicEffect::DivineIntervention) { MWBase::Environment::get().getWorld()->teleportToClosestMarker(target, "divinemarker"); + anim->removeEffect(ESM::MagicEffect::DivineIntervention); + const ESM::Static* fx = MWBase::Environment::get().getWorld()->getStore().get() + .search("VFX_Summon_end"); + if (fx) + MWBase::Environment::get().getWorld()->spawnEffect("meshes\\" + fx->mModel, + "", mCaster.getRefData().getPosition().asVec3()); return true; } else if (effectId == ESM::MagicEffect::AlmsiviIntervention) { MWBase::Environment::get().getWorld()->teleportToClosestMarker(target, "templemarker"); + anim->removeEffect(ESM::MagicEffect::AlmsiviIntervention); + const ESM::Static* fx = MWBase::Environment::get().getWorld()->getStore().get() + .search("VFX_Summon_end"); + if (fx) + MWBase::Environment::get().getWorld()->spawnEffect("meshes\\" + fx->mModel, + "", mCaster.getRefData().getPosition().asVec3()); return true; } @@ -674,6 +688,7 @@ namespace MWMechanics MWWorld::ActionTeleport action(markedCell->isExterior() ? "" : markedCell->getCell()->mName, markedPosition, false); action.execute(target); + anim->removeEffect(ESM::MagicEffect::Recall); } return true; } From 7e3cca6d37248bfb0b818e55666eb77246218fe8 Mon Sep 17 00:00:00 2001 From: Allofich Date: Mon, 19 Sep 2016 22:20:16 +0900 Subject: [PATCH 3/3] Vfx after Divine/Almsivi intervention should be attached to player --- apps/openmw/mwmechanics/spellcasting.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwmechanics/spellcasting.cpp b/apps/openmw/mwmechanics/spellcasting.cpp index b5b409bee..a02ee37b2 100644 --- a/apps/openmw/mwmechanics/spellcasting.cpp +++ b/apps/openmw/mwmechanics/spellcasting.cpp @@ -655,8 +655,7 @@ namespace MWMechanics const ESM::Static* fx = MWBase::Environment::get().getWorld()->getStore().get() .search("VFX_Summon_end"); if (fx) - MWBase::Environment::get().getWorld()->spawnEffect("meshes\\" + fx->mModel, - "", mCaster.getRefData().getPosition().asVec3()); + anim->addEffect("meshes\\" + fx->mModel, -1); return true; } else if (effectId == ESM::MagicEffect::AlmsiviIntervention) @@ -666,8 +665,7 @@ namespace MWMechanics const ESM::Static* fx = MWBase::Environment::get().getWorld()->getStore().get() .search("VFX_Summon_end"); if (fx) - MWBase::Environment::get().getWorld()->spawnEffect("meshes\\" + fx->mModel, - "", mCaster.getRefData().getPosition().asVec3()); + anim->addEffect("meshes\\" + fx->mModel, -1); return true; }