mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Make sure effects are destroyed with the animation
This commit is contained in:
parent
eccb8f38ba
commit
0dab7031c0
@ -445,7 +445,7 @@ namespace MWClass
|
||||
skillUsageSucceeded(ptr, weapskill, 0);
|
||||
|
||||
// Apply "On hit" enchanted weapons
|
||||
std::string enchantmentName = weapon.getClass().getEnchantment(weapon);
|
||||
std::string enchantmentName = !weapon.isEmpty() ? weapon.getClass().getEnchantment(weapon) : "";
|
||||
if (!enchantmentName.empty())
|
||||
{
|
||||
const ESM::Enchantment* enchantment = MWBase::Environment::get().getWorld()->getStore().get<ESM::Enchantment>().find(
|
||||
|
@ -87,6 +87,9 @@ Animation::Animation(const MWWorld::Ptr &ptr, Ogre::SceneNode *node)
|
||||
|
||||
Animation::~Animation()
|
||||
{
|
||||
for (std::vector<NifOgre::ObjectList>::iterator it = mEffects.begin(); it != mEffects.end(); ++it)
|
||||
destroyObjectList(mInsert->getCreator(), *it);
|
||||
|
||||
mAnimSources.clear();
|
||||
|
||||
Ogre::SceneManager *sceneMgr = mInsert->getCreator();
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include <OgreController.h>
|
||||
#include <OgreVector3.h>
|
||||
#include <OgreTimer.h>
|
||||
|
||||
#include <components/nifogre/ogrenifloader.hpp>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user