This commit is contained in:
scrawl 2016-09-05 00:04:11 +02:00
parent 8677a6f803
commit fbc9b90ebe
2 changed files with 2 additions and 4 deletions

View file

@ -283,8 +283,6 @@ namespace MWMechanics
{ {
} }
/// Get projectile properties (model, sound and speed) for a spell with the given effects and launch.
/// If \a model is empty, the spell has no ranged effects and should not spawn a projectile.
void CastSpell::launchMagicBolt (const ESM::EffectList& effects) void CastSpell::launchMagicBolt (const ESM::EffectList& effects)
{ {
osg::Vec3f fallbackDirection (0,1,0); osg::Vec3f fallbackDirection (0,1,0);

View file

@ -143,7 +143,7 @@ namespace MWWorld
attachTo = rotateNode; attachTo = rotateNode;
} }
osg::ref_ptr<osg::Node> ptr = mResourceSystem->getSceneManager()->getInstance(model, attachTo); mResourceSystem->getSceneManager()->getInstance(model, attachTo);
if (state.mIdMagic.size() > 1) if (state.mIdMagic.size() > 1)
for (size_t iter = 1; iter != state.mIdMagic.size(); ++iter) for (size_t iter = 1; iter != state.mIdMagic.size(); ++iter)
@ -209,7 +209,7 @@ namespace MWWorld
state.mEffects = getMagicBoltData(state.mIdMagic, state.mSoundIds, state.mSpeed, effects); state.mEffects = getMagicBoltData(state.mIdMagic, state.mSoundIds, state.mSpeed, effects);
// Non-projectile should have been removed by getMagicBoltData // Non-projectile should have been removed by getMagicBoltData
if (state.mEffects.mList.size() == 0) if (state.mEffects.mList.empty())
return; return;
MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(), state.mIdMagic.at(0)); MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(), state.mIdMagic.at(0));