]> git.mxchange.org Git - simgear.git/commitdiff
Fix another case where the direction vector is not initialized which can
authorcurt <curt>
Wed, 15 Sep 2004 15:28:14 +0000 (15:28 +0000)
committercurt <curt>
Wed, 15 Sep 2004 15:28:14 +0000 (15:28 +0000)
lead to openal "inrange" assertions, crashing FlightGear.

simgear/sound/sample_openal.cxx

index 27fc988364e7e4d539d58385e5c7e7aba8b833c0..e0aeb9a8c8bacdfc83edcf73d3588fa73834277a 100644 (file)
@@ -160,6 +160,7 @@ SGSoundSample::SGSoundSample( unsigned char *_data, int len, int _freq,
     source_pos[0] = 0.0; source_pos[1] = 0.0; source_pos[2] = 0.0;
     offset_pos[0] = 0.0; offset_pos[1] = 0.0; offset_pos[2] = 0.0;
     source_vel[0] = 0.0; source_vel[1] = 0.0; source_vel[2] = 0.0;
+    direction[0] = 0.0; direction[1] = 0.0; direction[2] = 0.0;
     inner = outer = 360.0; outergain = 0.0;
 
     // clear errors from elsewhere?