| 280 | //----------------------------------------------------------------------------- |
| 281 | |
| 282 | bool LevelInfo::onAdd() |
| 283 | { |
| 284 | if ( !Parent::onAdd() ) |
| 285 | return false; |
| 286 | |
| 287 | // If no sound ambience has been set, default to |
| 288 | // 'AudioAmbienceDefault'. |
| 289 | |
| 290 | if( !mSoundAmbience ) |
| 291 | Sim::findObject( "AudioAmbienceDefault", mSoundAmbience ); |
| 292 | |
| 293 | // Set up sound on client. |
| 294 | |
| 295 | if( isClientObject() ) |
| 296 | { |
| 297 | SFX->setDistanceModel( mSoundDistanceModel ); |
| 298 | |
| 299 | // Set up the global ambient soundscape. |
| 300 | |
| 301 | mSoundscape = SFX->getSoundscapeManager()->getGlobalSoundscape(); |
| 302 | if( mSoundAmbience ) |
| 303 | mSoundscape->setAmbience( mSoundAmbience ); |
| 304 | } |
| 305 | |
| 306 | _updateSceneGraph(); |
| 307 | |
| 308 | return true; |
| 309 | } |
| 310 | |
| 311 | //----------------------------------------------------------------------------- |
| 312 |
nothing calls this directly
no test coverage detected