mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
standardize soundasset preloading for datablocks
This commit is contained in:
parent
6c8dfdbe4c
commit
15f7f04bee
13 changed files with 46 additions and 58 deletions
|
|
@ -471,11 +471,10 @@ bool PlayerData::preload(bool server, String &errorStr)
|
|||
if (!server) {
|
||||
for (U32 i = 0; i < MaxSounds; ++i)
|
||||
{
|
||||
_setPlayerSound(getPlayerSound(i), i);
|
||||
if (getPlayerSound(i) != StringTable->EmptyString())
|
||||
if (getPlayerSound(i) != StringTable->EmptyString() && !isPlayerSoundValid(i))
|
||||
{
|
||||
if (!getPlayerSoundProfile(i))
|
||||
Con::errorf("PlayerData::Preload() - unable to find sfxProfile for asset %d %s", i, mPlayerSoundAssetId[i]);
|
||||
Con::errorf(ConsoleLogEntry::General, "ExplosionData::preload: Invalid PlayerSound asset.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue