|
|
@ -44,7 +44,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
namespace
|
|
|
|
namespace
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ESM::EffectList getMagicBoltData(std::vector<std::string>& projectileIDs, std::vector<std::string>& sounds, float& speed, std::string& texture, std::string& sourceName, const std::string& id)
|
|
|
|
ESM::EffectList getMagicBoltData(std::vector<std::string>& projectileIDs, std::set<std::string>& sounds, float& speed, std::string& texture, std::string& sourceName, const std::string& id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const MWWorld::ESMStore& esmStore = MWBase::Environment::get().getWorld()->getStore();
|
|
|
|
const MWWorld::ESMStore& esmStore = MWBase::Environment::get().getWorld()->getStore();
|
|
|
|
const ESM::EffectList* effects;
|
|
|
|
const ESM::EffectList* effects;
|
|
|
@ -88,9 +88,9 @@ namespace
|
|
|
|
"alteration", "conjuration", "destruction", "illusion", "mysticism", "restoration"
|
|
|
|
"alteration", "conjuration", "destruction", "illusion", "mysticism", "restoration"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (!magicEffect->mBoltSound.empty())
|
|
|
|
if (!magicEffect->mBoltSound.empty())
|
|
|
|
sounds.push_back(magicEffect->mBoltSound);
|
|
|
|
sounds.emplace(magicEffect->mBoltSound);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sounds.push_back(schools[magicEffect->mData.mSchool] + " bolt");
|
|
|
|
sounds.emplace(schools[magicEffect->mData.mSchool] + " bolt");
|
|
|
|
projectileEffects.mList.push_back(*iter);
|
|
|
|
projectileEffects.mList.push_back(*iter);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -297,9 +297,9 @@ namespace MWWorld
|
|
|
|
createModel(state, ptr.getClass().getModel(ptr), pos, orient, true, true, lightDiffuseColor, texture);
|
|
|
|
createModel(state, ptr.getClass().getModel(ptr), pos, orient, true, true, lightDiffuseColor, texture);
|
|
|
|
|
|
|
|
|
|
|
|
MWBase::SoundManager *sndMgr = MWBase::Environment::get().getSoundManager();
|
|
|
|
MWBase::SoundManager *sndMgr = MWBase::Environment::get().getSoundManager();
|
|
|
|
for (size_t it = 0; it != state.mSoundIds.size(); it++)
|
|
|
|
for (const std::string &soundid : state.mSoundIds)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MWBase::Sound *sound = sndMgr->playSound3D(pos, state.mSoundIds.at(it), 1.0f, 1.0f,
|
|
|
|
MWBase::Sound *sound = sndMgr->playSound3D(pos, soundid, 1.0f, 1.0f,
|
|
|
|
MWSound::Type::Sfx, MWSound::PlayMode::Loop);
|
|
|
|
MWSound::Type::Sfx, MWSound::PlayMode::Loop);
|
|
|
|
if (sound)
|
|
|
|
if (sound)
|
|
|
|
state.mSounds.push_back(sound);
|
|
|
|
state.mSounds.push_back(sound);
|
|
|
@ -656,9 +656,9 @@ namespace MWWorld
|
|
|
|
createModel(state, model, osg::Vec3f(esm.mPosition), osg::Quat(esm.mOrientation), true, true, lightDiffuseColor, texture);
|
|
|
|
createModel(state, model, osg::Vec3f(esm.mPosition), osg::Quat(esm.mOrientation), true, true, lightDiffuseColor, texture);
|
|
|
|
|
|
|
|
|
|
|
|
MWBase::SoundManager *sndMgr = MWBase::Environment::get().getSoundManager();
|
|
|
|
MWBase::SoundManager *sndMgr = MWBase::Environment::get().getSoundManager();
|
|
|
|
for (size_t soundIter = 0; soundIter != state.mSoundIds.size(); soundIter++)
|
|
|
|
for (const std::string &soundid : state.mSoundIds)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MWBase::Sound *sound = sndMgr->playSound3D(esm.mPosition, state.mSoundIds.at(soundIter), 1.0f, 1.0f,
|
|
|
|
MWBase::Sound *sound = sndMgr->playSound3D(esm.mPosition, soundid, 1.0f, 1.0f,
|
|
|
|
MWSound::Type::Sfx, MWSound::PlayMode::Loop);
|
|
|
|
MWSound::Type::Sfx, MWSound::PlayMode::Loop);
|
|
|
|
if (sound)
|
|
|
|
if (sound)
|
|
|
|
state.mSounds.push_back(sound);
|
|
|
|
state.mSounds.push_back(sound);
|
|
|
|