mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 07:19:41 +00:00
Add check for an empty sound field to SoundGens verifier
This commit is contained in:
parent
2c15ad5e0c
commit
281088c93b
1 changed files with 6 additions and 2 deletions
|
@ -29,7 +29,7 @@ void CSMTools::SoundGenCheckStage::perform(int stage, CSMDoc::Messages &messages
|
|||
const ESM::SoundGenerator soundGen = record.get();
|
||||
CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_SoundGen, soundGen.mId);
|
||||
|
||||
if (soundGen.mCreature != "")
|
||||
if (!soundGen.mCreature.empty())
|
||||
{
|
||||
CSMWorld::RefIdData::LocalIndex creatureIndex = mReferenceables.getDataSet().searchId(soundGen.mCreature);
|
||||
if (creatureIndex.first == -1)
|
||||
|
@ -42,7 +42,11 @@ void CSMTools::SoundGenCheckStage::perform(int stage, CSMDoc::Messages &messages
|
|||
}
|
||||
}
|
||||
|
||||
if (mSounds.searchId(soundGen.mSound) == -1)
|
||||
if (soundGen.mSound.empty())
|
||||
{
|
||||
messages.push_back(std::make_pair(id, "Sound is not specified"));
|
||||
}
|
||||
else if (mSounds.searchId(soundGen.mSound) == -1)
|
||||
{
|
||||
messages.push_back(std::make_pair(id, "No such sound '" + soundGen.mSound + "'"));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue