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
|
|
@ -318,17 +318,19 @@ bool RigidShapeData::preload(bool server, String &errorStr)
|
|||
if (!server) {
|
||||
for (S32 i = 0; i < Body::MaxSounds; i++)
|
||||
{
|
||||
if (getBodySounds(i) != StringTable->EmptyString())
|
||||
if (getBodySounds(i) != StringTable->EmptyString() && !isBodySoundsValid(i))
|
||||
{
|
||||
_setBodySounds(getBodySounds(i), i);
|
||||
Con::errorf(ConsoleLogEntry::General, "RigidShapeData::preload: Invalid BodySound asset.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (S32 j = 0; j < Sounds::MaxSounds; j++)
|
||||
{
|
||||
if (getWaterSounds(j) != StringTable->EmptyString())
|
||||
if (getWaterSounds(j) != StringTable->EmptyString() && !isWaterSoundsValid(j))
|
||||
{
|
||||
_setWaterSounds(getWaterSounds(j), j);
|
||||
Con::errorf(ConsoleLogEntry::General, "RigidShapeData::preload: Invalid WaterSound asset.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue