1
0
Fork 0

Dont execute code in case the soundmanager isn't properly initialized

This commit is contained in:
ehofman 2009-09-08 17:06:13 +00:00 committed by Tim Moore
parent 049e1ae23e
commit 10611c1522

View file

@ -485,6 +485,7 @@ static void fgMainLoop( void ) {
globals->get_viewmgr()->update(real_delta_time_sec); globals->get_viewmgr()->update(real_delta_time_sec);
#ifdef ENABLE_AUDIO_SUPPORT #ifdef ENABLE_AUDIO_SUPPORT
if ( globals->get_soundmgr()->is_working() ) {
// Right now we make a simplifying assumption that the primary // Right now we make a simplifying assumption that the primary
// aircraft is the source of all sounds and that all sounds are // aircraft is the source of all sounds and that all sounds are
// positioned in the aircraft base // positioned in the aircraft base
@ -599,6 +600,7 @@ static void fgMainLoop( void ) {
sgVec3 listener_pos; sgVec3 listener_pos;
sgSetVec3( listener_pos, 0.0, 0.0, 0.0 ); sgSetVec3( listener_pos, 0.0, 0.0, 0.0 );
globals->get_soundmgr()->set_listener_pos( listener_pos ); globals->get_soundmgr()->set_listener_pos( listener_pos );
}
#endif #endif
// END Tile Manager udpates // END Tile Manager udpates