diff options
Diffstat (limited to 'src/GameInitDispose.cpp')
-rw-r--r-- | src/GameInitDispose.cpp | 72 |
1 files changed, 34 insertions, 38 deletions
diff --git a/src/GameInitDispose.cpp b/src/GameInitDispose.cpp index 8a56e73..b791183 100644 --- a/src/GameInitDispose.cpp +++ b/src/GameInitDispose.cpp @@ -226,113 +226,109 @@ void LoadSounds(bool musictoggle) FreeOGG(formatBuffer1, pBuffer1, lBuffer1Len, freqBuffer1); } - float gLoc[3]; - gLoc[0]=0; - gLoc[1]=0; - gLoc[2]=0; - - alSourcefv(gSourceID[visionsound], AL_POSITION, gLoc); + alListenerfv(AL_POSITION, {}); + alSourcefv(gSourceID[visionsound], AL_POSITION, {}); alSourcei(gSourceID[visionsound], AL_LOOPING, 1); alSourcef(gSourceID[visionsound], AL_MIN_GAIN, 1); - alSourcefv(gSourceID[soulinsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[soulinsound], AL_POSITION, {}); alSourcei(gSourceID[soulinsound], AL_LOOPING, 0); alSourcef(gSourceID[soulinsound], AL_MIN_GAIN, 1); - alSourcefv(gSourceID[souloutsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[souloutsound], AL_POSITION, {}); alSourcei(gSourceID[souloutsound], AL_LOOPING, 0); alSourcef(gSourceID[souloutsound], AL_MIN_GAIN, 1); for(int i=0;i<5;i++){ - alSourcefv(gSourceID[footstepsound+i], AL_POSITION, gLoc); + alSourcefv(gSourceID[footstepsound+i], AL_POSITION, {}); alSourcei(gSourceID[footstepsound+i], AL_LOOPING, 0); alSourcef(gSourceID[footstepsound+i], AL_MIN_GAIN, 0); } - alSourcefv(gSourceID[bodylandsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[bodylandsound], AL_POSITION, {}); alSourcei(gSourceID[bodylandsound], AL_LOOPING, 0); alSourcef(gSourceID[bodylandsound], AL_MIN_GAIN, 0); - alSourcefv(gSourceID[headlandsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[headlandsound], AL_POSITION, {}); alSourcei(gSourceID[headlandsound], AL_LOOPING, 0); alSourcef(gSourceID[headlandsound], AL_MIN_GAIN, 0); - alSourcefv(gSourceID[riflesound], AL_POSITION, gLoc); + alSourcefv(gSourceID[riflesound], AL_POSITION, {}); alSourcei(gSourceID[riflesound], AL_LOOPING, 0); alSourcef(gSourceID[riflesound], AL_MIN_GAIN, 0); - alSourcefv(gSourceID[bodyhitsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[bodyhitsound], AL_POSITION, {}); alSourcei(gSourceID[bodyhitsound], AL_LOOPING, 0); alSourcef(gSourceID[bodyhitsound], AL_MIN_GAIN, .1); - alSourcefv(gSourceID[wallhitsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[wallhitsound], AL_POSITION, {}); alSourcei(gSourceID[wallhitsound], AL_LOOPING, 0); alSourcef(gSourceID[wallhitsound], AL_MIN_GAIN, 0); alSourcef(gSourceID[wallhitsound], AL_MAX_GAIN, .6); - alSourcefv(gSourceID[machinegunsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[machinegunsound], AL_POSITION, {}); alSourcei(gSourceID[machinegunsound], AL_LOOPING, 0); alSourcef(gSourceID[machinegunsound], AL_MIN_GAIN,0); - alSourcefv(gSourceID[nearbulletsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[nearbulletsound], AL_POSITION, {}); alSourcei(gSourceID[nearbulletsound], AL_LOOPING, 0); alSourcef(gSourceID[nearbulletsound], AL_MIN_GAIN,0); - alSourcefv(gSourceID[headwhacksound], AL_POSITION, gLoc); + alSourcefv(gSourceID[headwhacksound], AL_POSITION, {}); alSourcei(gSourceID[headwhacksound], AL_LOOPING, 0); alSourcef(gSourceID[headwhacksound], AL_MIN_GAIN,0); - alSourcefv(gSourceID[headshotsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[headshotsound], AL_POSITION, {}); alSourcei(gSourceID[headshotsound], AL_LOOPING, 0); alSourcef(gSourceID[headshotsound], AL_MIN_GAIN, 0); - alSourcefv(gSourceID[reloadsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[reloadsound], AL_POSITION, {}); alSourcei(gSourceID[reloadsound], AL_LOOPING, 0); alSourcef(gSourceID[reloadsound], AL_MIN_GAIN, 0); - alSourcefv(gSourceID[clicksound], AL_POSITION, gLoc); + alSourcefv(gSourceID[clicksound], AL_POSITION, {}); alSourcei(gSourceID[clicksound], AL_LOOPING, 0); alSourcef(gSourceID[clicksound], AL_MIN_GAIN, 0); - alSourcefv(gSourceID[pistol1sound], AL_POSITION, gLoc); + alSourcefv(gSourceID[pistol1sound], AL_POSITION, {}); alSourcei(gSourceID[pistol1sound], AL_LOOPING, 0); alSourcef(gSourceID[pistol1sound], AL_MIN_GAIN, 0); - alSourcefv(gSourceID[pistol2sound], AL_POSITION, gLoc); + alSourcefv(gSourceID[pistol2sound], AL_POSITION, {}); alSourcei(gSourceID[pistol2sound], AL_LOOPING, 0); alSourcef(gSourceID[pistol2sound], AL_MIN_GAIN, 0); - alSourcefv(gSourceID[pinpullsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[pinpullsound], AL_POSITION, {}); alSourcei(gSourceID[pinpullsound], AL_LOOPING, 0); alSourcef(gSourceID[pinpullsound], AL_MIN_GAIN,0); - alSourcefv(gSourceID[pinreplacesound], AL_POSITION, gLoc); + alSourcefv(gSourceID[pinreplacesound], AL_POSITION, {}); alSourcei(gSourceID[pinreplacesound], AL_LOOPING, 0); alSourcef(gSourceID[pinreplacesound], AL_MIN_GAIN,0); - alSourcefv(gSourceID[grenadethrowsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[grenadethrowsound], AL_POSITION, {}); alSourcei(gSourceID[grenadethrowsound], AL_LOOPING, 0); alSourcef(gSourceID[grenadethrowsound], AL_MIN_GAIN,0); - alSourcefv(gSourceID[bouncesound], AL_POSITION, gLoc); + alSourcefv(gSourceID[bouncesound], AL_POSITION, {}); alSourcei(gSourceID[bouncesound], AL_LOOPING, 0); alSourcef(gSourceID[bouncesound], AL_MIN_GAIN,0); - alSourcefv(gSourceID[bounce2sound], AL_POSITION, gLoc); + alSourcefv(gSourceID[bounce2sound], AL_POSITION, {}); alSourcei(gSourceID[bounce2sound], AL_LOOPING, 0); alSourcef(gSourceID[bounce2sound], AL_MIN_GAIN,0); - alSourcefv(gSourceID[explosionsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[explosionsound], AL_POSITION, {}); alSourcei(gSourceID[explosionsound], AL_LOOPING, 0); alSourcef(gSourceID[explosionsound], AL_MIN_GAIN,0); - alSourcefv(gSourceID[bodywhacksound], AL_POSITION, gLoc); + alSourcefv(gSourceID[bodywhacksound], AL_POSITION, {}); alSourcei(gSourceID[bodywhacksound], AL_LOOPING, 0); alSourcef(gSourceID[bodywhacksound], AL_MIN_GAIN, 0); - alSourcefv(gSourceID[rainsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[rainsound], AL_POSITION, {}); alSourcei(gSourceID[rainsound], AL_LOOPING, 1); alSourcef(gSourceID[rainsound], AL_MIN_GAIN, .3); - alSourcefv(gSourceID[losesound], AL_POSITION, gLoc); + alSourcefv(gSourceID[losesound], AL_POSITION, {}); alSourcei(gSourceID[losesound], AL_LOOPING, 0); alSourcef(gSourceID[losesound], AL_MIN_GAIN, 1); - alSourcefv(gSourceID[disguisekillsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[disguisekillsound], AL_POSITION, {}); alSourcei(gSourceID[disguisekillsound], AL_LOOPING, 0); alSourcef(gSourceID[disguisekillsound], AL_MIN_GAIN, 1); - alSourcefv(gSourceID[knifeslashsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[knifeslashsound], AL_POSITION, {}); alSourcei(gSourceID[knifeslashsound], AL_LOOPING, 0); alSourcef(gSourceID[knifeslashsound], AL_MIN_GAIN,0); - alSourcefv(gSourceID[shotgunsound], AL_POSITION, gLoc); + alSourcefv(gSourceID[shotgunsound], AL_POSITION, {}); alSourcei(gSourceID[shotgunsound], AL_LOOPING, 0); alSourcef(gSourceID[shotgunsound], AL_MIN_GAIN, 0); - alSourcefv(gSourceID[knifesong], AL_POSITION, gLoc); + alSourcefv(gSourceID[knifesong], AL_POSITION, {}); alSourcei(gSourceID[knifesong], AL_LOOPING, 1); alSourcef(gSourceID[knifesong], AL_MIN_GAIN, 1); - alSourcefv(gSourceID[mainmenusong], AL_POSITION, gLoc); + alSourcefv(gSourceID[mainmenusong], AL_POSITION, {}); alSourcei(gSourceID[mainmenusong], AL_LOOPING, 1); alSourcef(gSourceID[mainmenusong], AL_MIN_GAIN, 1); - alSourcefv(gSourceID[zombiesong], AL_POSITION, gLoc); + alSourcefv(gSourceID[zombiesong], AL_POSITION, {}); alSourcei(gSourceID[zombiesong], AL_LOOPING, 1); alSourcef(gSourceID[zombiesong], AL_MIN_GAIN, 1); - alSourcefv(gSourceID[shootsong], AL_POSITION, gLoc); + alSourcefv(gSourceID[shootsong], AL_POSITION, {}); alSourcei(gSourceID[shootsong], AL_LOOPING, 1); alSourcef(gSourceID[shootsong], AL_MIN_GAIN, 1); } |