mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-09 18:40:14 +00:00
Particle fixes
This commit is contained in:
parent
261ed1f4e5
commit
af2f26d04d
@ -1172,14 +1172,10 @@ bool CharacterController::updateWeaponState()
|
|||||||
effect = store.get<ESM::MagicEffect>().find(effectentry.mEffectID);
|
effect = store.get<ESM::MagicEffect>().find(effectentry.mEffectID);
|
||||||
|
|
||||||
const ESM::Static* castStatic = MWBase::Environment::get().getWorld()->getStore().get<ESM::Static>().find ("VFX_Hands");
|
const ESM::Static* castStatic = MWBase::Environment::get().getWorld()->getStore().get<ESM::Static>().find ("VFX_Hands");
|
||||||
if (mAnimation->hasNode("Left Hand"))
|
if (mAnimation->hasNode("Bip01 L Hand"))
|
||||||
mAnimation->addEffect("meshes\\" + castStatic->mModel, -1, false, "Left Hand", effect->mParticle);
|
|
||||||
else
|
|
||||||
mAnimation->addEffect("meshes\\" + castStatic->mModel, -1, false, "Bip01 L Hand", effect->mParticle);
|
mAnimation->addEffect("meshes\\" + castStatic->mModel, -1, false, "Bip01 L Hand", effect->mParticle);
|
||||||
|
|
||||||
if (mAnimation->hasNode("Right Hand"))
|
if (mAnimation->hasNode("Bip01 R Hand"))
|
||||||
mAnimation->addEffect("meshes\\" + castStatic->mModel, -1, false, "Right Hand", effect->mParticle);
|
|
||||||
else
|
|
||||||
mAnimation->addEffect("meshes\\" + castStatic->mModel, -1, false, "Bip01 R Hand", effect->mParticle);
|
mAnimation->addEffect("meshes\\" + castStatic->mModel, -1, false, "Bip01 R Hand", effect->mParticle);
|
||||||
|
|
||||||
switch(effectentry.mRange)
|
switch(effectentry.mRange)
|
||||||
|
@ -1042,11 +1042,11 @@ namespace MWRender
|
|||||||
parentNode = mObjectRoot->asGroup();
|
parentNode = mObjectRoot->asGroup();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SceneUtil::FindByNameVisitor visitor(bonename);
|
NodeMap::iterator found = mNodeMap.find(Misc::StringUtils::lowerCase(bonename));
|
||||||
mObjectRoot->accept(visitor);
|
if (found == mNodeMap.end())
|
||||||
if (!visitor.mFoundNode)
|
|
||||||
throw std::runtime_error("Can't find bone " + bonename);
|
throw std::runtime_error("Can't find bone " + bonename);
|
||||||
parentNode = visitor.mFoundNode;
|
|
||||||
|
parentNode = found->second;
|
||||||
}
|
}
|
||||||
osg::ref_ptr<osg::Node> node = mResourceSystem->getSceneManager()->createInstance(model, parentNode);
|
osg::ref_ptr<osg::Node> node = mResourceSystem->getSceneManager()->createInstance(model, parentNode);
|
||||||
params.mObjects = PartHolderPtr(new PartHolder(node));
|
params.mObjects = PartHolderPtr(new PartHolder(node));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user