mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 21:35:24 +00:00
Use the Original Creature field for SoundGen lookups
This commit is contained in:
parent
2601b26217
commit
f42420bc19
@ -675,13 +675,12 @@ namespace MWClass
|
|||||||
std::vector<const ESM::SoundGenerator*> sounds;
|
std::vector<const ESM::SoundGenerator*> sounds;
|
||||||
sounds.reserve(8);
|
sounds.reserve(8);
|
||||||
|
|
||||||
std::string ptrid = Creature::getId(ptr);
|
MWWorld::LiveCellRef<ESM::Creature>* ref = ptr.get<ESM::Creature>();
|
||||||
|
|
||||||
MWWorld::Store<ESM::SoundGenerator>::iterator sound = store.begin();
|
MWWorld::Store<ESM::SoundGenerator>::iterator sound = store.begin();
|
||||||
while(sound != store.end())
|
while(sound != store.end())
|
||||||
{
|
{
|
||||||
if(type == sound->mType && !sound->mCreature.empty() &&
|
if (type == sound->mType && !sound->mCreature.empty() && Misc::StringUtils::ciEqual(ref->mBase->mOriginal, sound->mCreature))
|
||||||
Misc::StringUtils::ciEqual(ptrid.substr(0, sound->mCreature.size()),
|
|
||||||
sound->mCreature))
|
|
||||||
sounds.push_back(&*sound);
|
sounds.push_back(&*sound);
|
||||||
++sound;
|
++sound;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user