MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / onAdd

Method onAdd

Engine/source/T3D/levelInfo.cpp:270–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268//-----------------------------------------------------------------------------
269
270bool LevelInfo::onAdd()
271{
272 if ( !Parent::onAdd() )
273 return false;
274
275 // If no sound ambience has been set, default to
276 // 'AudioAmbienceDefault'.
277
278 if( !mSoundAmbience )
279 Sim::findObject( "AudioAmbienceDefault", mSoundAmbience );
280
281 // Set up sound on client.
282
283 if( isClientObject() )
284 {
285 SFX->setDistanceModel( mSoundDistanceModel );
286
287 // Set up the global ambient soundscape.
288
289 mSoundscape = SFX->getSoundscapeManager()->getGlobalSoundscape();
290 if( mSoundAmbience )
291 mSoundscape->setAmbience( mSoundAmbience );
292 }
293
294 _updateSceneGraph();
295
296 return true;
297}
298
299//-----------------------------------------------------------------------------
300

Callers

nothing calls this directly

Calls 5

getGlobalSoundscapeMethod · 0.80
getSoundscapeManagerMethod · 0.80
setAmbienceMethod · 0.80
findObjectFunction · 0.50
setDistanceModelMethod · 0.45

Tested by

no test coverage detected