mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 23:21:20 -04:00
Use SoundGen fallback for type Land only (Fixes #2228)
This commit is contained in:
parent
de9d347018
commit
377b79d5ba
@ -678,7 +678,6 @@ namespace MWClass
|
|||||||
if(type >= 0)
|
if(type >= 0)
|
||||||
{
|
{
|
||||||
std::vector<const ESM::SoundGenerator*> sounds;
|
std::vector<const ESM::SoundGenerator*> sounds;
|
||||||
std::vector<const ESM::SoundGenerator*> fallbacksounds;
|
|
||||||
|
|
||||||
MWWorld::LiveCellRef<ESM::Creature>* ref = ptr.get<ESM::Creature>();
|
MWWorld::LiveCellRef<ESM::Creature>* ref = ptr.get<ESM::Creature>();
|
||||||
|
|
||||||
@ -689,16 +688,15 @@ namespace MWClass
|
|||||||
{
|
{
|
||||||
if (type == sound->mType && !sound->mCreature.empty() && (Misc::StringUtils::ciEqual(ourId, sound->mCreature)))
|
if (type == sound->mType && !sound->mCreature.empty() && (Misc::StringUtils::ciEqual(ourId, sound->mCreature)))
|
||||||
sounds.push_back(&*sound);
|
sounds.push_back(&*sound);
|
||||||
if (type == sound->mType && sound->mCreature.empty())
|
|
||||||
fallbacksounds.push_back(&*sound);
|
|
||||||
++sound;
|
++sound;
|
||||||
}
|
}
|
||||||
if(!sounds.empty())
|
if(!sounds.empty())
|
||||||
return sounds[(int)(rand()/(RAND_MAX+1.0)*sounds.size())]->mSound;
|
return sounds[(int)(rand()/(RAND_MAX+1.0)*sounds.size())]->mSound;
|
||||||
if (!fallbacksounds.empty())
|
|
||||||
return fallbacksounds[(int)(rand()/(RAND_MAX+1.0)*fallbacksounds.size())]->mSound;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type == ESM::SoundGenerator::Land)
|
||||||
|
return "Body Fall Large";
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user