mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:49:56 +00:00
Apply looping particles when adding spell to existing actor (bug #4918)
This commit is contained in:
parent
8cb4898ae7
commit
5508e67aad
3 changed files with 11 additions and 3 deletions
|
@ -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!
|
||||
actor.getClass().getCreatureStats(actor).getSpells().add(it->first);
|
||||
MWBase::Environment::get().getWorld()->applyLoopingParticles(actor);
|
||||
|
||||
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);
|
||||
runtime.pop();
|
||||
|
||||
// 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);
|
||||
creatureStats.getSpells().add(id);
|
||||
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
|
||||
MWBase::Environment::get().getWorld()->applyLoopingParticles(ptr);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue