Unverified Commit 3e61ef32 authored by Alexei Dobrohotov's avatar Alexei Dobrohotov Committed by GitHub

Merge pull request #2332 from akortunov/particles

Apply looping particles when adding spell to existing actor
parents 0fac2856 5508e67a
Pipeline #57712285 passed with stage
......@@ -51,6 +51,7 @@
Bug #4896: Title screen music doesn't loop
Bug #4911: Editor: QOpenGLContext::swapBuffers() warning with Qt5
Bug #4916: Specular power (shininess) material parameter is ignored when shaders are used.
Bug #4918: Abilities don't play looping VFX when they're initially applied
Bug #4922: Werewolves can not attack if the transformation happens during attack
Bug #4927: Spell effect having both a skill and an attribute assigned is a fatal error
Bug #4932: Invalid records matching when loading save with edited plugin
......@@ -57,6 +57,7 @@ namespace MWMechanics
// Contracted disease!
std::string msg = "sMagicContractDisease";
msg = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find(msg)->mValue.getString();
......@@ -455,10 +455,16 @@ namespace MWScript
std::string id = runtime.getStringLiteral (runtime[0].mInteger);
// make sure a spell with this ID actually exists.
MWBase::Environment::get().getWorld()->getStore().get<ESM::Spell>().find (id);
const ESM::Spell* spell = MWBase::Environment::get().getWorld()->getStore().get<ESM::Spell>().find (id);
ptr.getClass().getCreatureStats (ptr).getSpells().add (id);
MWMechanics::CreatureStats& creatureStats = ptr.getClass().getCreatureStats(ptr);
ESM::Spell::SpellType type = static_cast<ESM::Spell::SpellType>(spell->mData.mType);
if (type != ESM::Spell::ST_Spell && type != ESM::Spell::ST_Power)
// Apply looping particles immediately for constant effects
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment