mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 09:04:38 +00:00
don't check a profile if we don't have a sound asset
This commit is contained in:
parent
ef652ad8b9
commit
44b81ace69
1 changed files with 5 additions and 7 deletions
|
|
@ -294,19 +294,17 @@ bool LightningData::preload(bool server, String &errorStr)
|
||||||
|
|
||||||
if (server == false)
|
if (server == false)
|
||||||
{
|
{
|
||||||
for (S32 i = 0; i < MaxThunders; i++) {
|
for (S32 i = 0; i < MaxThunders; i++)
|
||||||
|
{
|
||||||
if (getThunderSound(i))
|
if (getThunderSound(i))
|
||||||
{
|
{
|
||||||
_setThunderSound(getThunderSound(i), i);
|
_setThunderSound(getThunderSound(i), i);
|
||||||
|
if (!getThunderSoundProfile(i))
|
||||||
|
Con::errorf(ConsoleLogEntry::General, "LightningData::preload: Cant get an sfxProfile for thunder.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (U32 j = 0; j < MaxThunders; j++) {
|
if(getStrikeSound() && !getStrikeSoundProfile())
|
||||||
if (!getThunderSoundProfile(j))
|
|
||||||
Con::errorf(ConsoleLogEntry::General, "LightningData::preload: Cant get an sfxProfile for thunder.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!getStrikeSoundProfile())
|
|
||||||
Con::errorf(ConsoleLogEntry::General, "LightningData::preload: can't get sfxProfile from asset");
|
Con::errorf(ConsoleLogEntry::General, "LightningData::preload: can't get sfxProfile from asset");
|
||||||
|
|
||||||
mNumStrikeTextures = 0;
|
mNumStrikeTextures = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue