mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
Renamed local variable so it doesn't interfere with the provided argument.
String errorStr should be filled in only when ::preload returns false.
This commit is contained in:
parent
b0fcc91058
commit
a7756b5591
|
|
@ -736,9 +736,9 @@ bool ExplosionData::preload(bool server, String &errorStr)
|
|||
|
||||
if( !server )
|
||||
{
|
||||
String errorStr;
|
||||
if( !sfxResolve( &soundProfile, errorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "Error, unable to load sound profile for explosion datablock: %s", errorStr.c_str());
|
||||
String sfxErrorStr;
|
||||
if( !sfxResolve( &soundProfile, sfxErrorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "Error, unable to load sound profile for explosion datablock: %s", sfxErrorStr.c_str());
|
||||
if (!particleEmitter && particleEmitterId != 0)
|
||||
if (Sim::findObject(particleEmitterId, particleEmitter) == false)
|
||||
Con::errorf(ConsoleLogEntry::General, "Error, unable to load particle emitter for explosion datablock");
|
||||
|
|
|
|||
|
|
@ -287,14 +287,14 @@ bool LightningData::preload(bool server, String &errorStr)
|
|||
|
||||
if (server == false)
|
||||
{
|
||||
String errorStr;
|
||||
String sfxErrorStr;
|
||||
for (U32 i = 0; i < MaxThunders; i++) {
|
||||
if( !sfxResolve( &thunderSounds[ i ], errorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "LightningData::preload: Invalid packet: %s", errorStr.c_str());
|
||||
if( !sfxResolve( &thunderSounds[ i ], sfxErrorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "LightningData::preload: Invalid packet: %s", sfxErrorStr.c_str());
|
||||
}
|
||||
|
||||
if( !sfxResolve( &strikeSound, errorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "LightningData::preload: Invalid packet: %s", errorStr.c_str());
|
||||
if( !sfxResolve( &strikeSound, sfxErrorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "LightningData::preload: Invalid packet: %s", sfxErrorStr.c_str());
|
||||
|
||||
for (U32 i = 0; i < MaxTextures; i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -427,9 +427,9 @@ bool PlayerData::preload(bool server, String &errorStr)
|
|||
{
|
||||
for( U32 i = 0; i < MaxSounds; ++ i )
|
||||
{
|
||||
String errorStr;
|
||||
if( !sfxResolve( &sound[ i ], errorStr ) )
|
||||
Con::errorf( "PlayerData::preload: %s", errorStr.c_str() );
|
||||
String sfxErrorStr;
|
||||
if( !sfxResolve( &sound[ i ], sfxErrorStr ) )
|
||||
Con::errorf( "PlayerData::preload: %s", sfxErrorStr.c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -320,9 +320,9 @@ bool ProjectileData::preload(bool server, String &errorStr)
|
|||
if (Sim::findObject(decalId, decal) == false)
|
||||
Con::errorf(ConsoleLogEntry::General, "ProjectileData::preload: Invalid packet, bad datablockId(decal): %d", decalId);
|
||||
|
||||
String errorStr;
|
||||
if( !sfxResolve( &sound, errorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "ProjectileData::preload: Invalid packet: %s", errorStr.c_str());
|
||||
String sfxErrorStr;
|
||||
if( !sfxResolve( &sound, sfxErrorStr ) )
|
||||
Con::errorf(ConsoleLogEntry::General, "ProjectileData::preload: Invalid packet: %s", sfxErrorStr.c_str());
|
||||
|
||||
if (!lightDesc && lightDescId != 0)
|
||||
if (Sim::findObject(lightDescId, lightDesc) == false)
|
||||
|
|
|
|||
|
|
@ -136,11 +136,11 @@ bool ProximityMineData::preload( bool server, String& errorStr )
|
|||
if ( !server )
|
||||
{
|
||||
// Resolve sounds
|
||||
String errorStr;
|
||||
if( !sfxResolve( &armingSound, errorStr ) )
|
||||
Con::errorf( ConsoleLogEntry::General, "ProximityMineData::preload: Invalid packet: %s", errorStr.c_str() );
|
||||
if( !sfxResolve( &triggerSound, errorStr ) )
|
||||
Con::errorf( ConsoleLogEntry::General, "ProximityMineData::preload: Invalid packet: %s", errorStr.c_str() );
|
||||
String sfxErrorStr;
|
||||
if( !sfxResolve( &armingSound, sfxErrorStr ) )
|
||||
Con::errorf( ConsoleLogEntry::General, "ProximityMineData::preload: Invalid packet: %s", sfxErrorStr.c_str() );
|
||||
if( !sfxResolve( &triggerSound, sfxErrorStr ) )
|
||||
Con::errorf( ConsoleLogEntry::General, "ProximityMineData::preload: Invalid packet: %s", sfxErrorStr.c_str() );
|
||||
}
|
||||
|
||||
if ( mShape )
|
||||
|
|
|
|||
Loading…
Reference in a new issue