MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / preload

Method preload

Engine/source/sfx/sfxAmbience.cpp:142–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140//-----------------------------------------------------------------------------
141
142bool SFXAmbience::preload( bool server, String& errorStr )
143{
144 if( !Parent::preload( server, errorStr ) )
145 return false;
146
147 validate();
148
149 // Resolve datablocks on client.
150
151 if( !server )
152 {
153 if( !sfxResolve( &mEnvironment, errorStr ) )
154 return false;
155
156 _setSoundTrack(getSoundTrack());
157 if (!getSoundTrackProfile())
158 {
159 Con::errorf("SFXAmbience::Preload() - unable to find sfxProfile for asset %s", mSoundTrackAssetId);
160 return false;
161 }
162
163 for( U32 i = 0; i < MaxStates; ++ i )
164 if( !sfxResolve( &mState[ i ], errorStr ) )
165 return false;
166 }
167
168 return true;
169}
170
171//-----------------------------------------------------------------------------
172

Callers

nothing calls this directly

Calls 3

validateFunction · 0.85
sfxResolveFunction · 0.85
errorfFunction · 0.50

Tested by

no test coverage detected