| 268 | //----------------------------------------------------------------------------- |
| 269 | |
| 270 | bool 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 |
nothing calls this directly
no test coverage detected