X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameDraw.cpp;h=068fb87838af026b2c6e084ea86aa1b20b0b4d5b;hb=03e3d05a91e2a3aea407387d9531177b2ca31813;hp=c98a3d29608b411029aae548d3d1cfb02f2f5351;hpb=ac2329020de30416484a59f41e1156439d143b87;p=lugaru.git diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index c98a3d2..068fb87 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -954,14 +954,6 @@ int Game::DrawGLScene(StereoSide side) indialogue=0; dialoguegonethrough[whichdialogue]++; if(dialogueboxsound[whichdialogue][indialogue]!=0){ - static float gLoc[3]; - static float vel[3]; - gLoc[0]=player[participantfocus[whichdialogue][indialogue]].coords.x; - gLoc[1]=player[participantfocus[whichdialogue][indialogue]].coords.y; - gLoc[2]=player[participantfocus[whichdialogue][indialogue]].coords.z; - vel[0]=0; - vel[1]=0; - vel[2]=0; int whichsoundplay; if(dialogueboxsound[whichdialogue][indialogue]==1)whichsoundplay=rabbitchitter; if(dialogueboxsound[whichdialogue][indialogue]==2)whichsoundplay=rabbitchitter2; @@ -983,10 +975,7 @@ int Game::DrawGLScene(StereoSide side) if(dialogueboxsound[whichdialogue][indialogue]==-2)whichsoundplay=firestartsound; if(dialogueboxsound[whichdialogue][indialogue]==-3)whichsoundplay=consolesuccesssound; if(dialogueboxsound[whichdialogue][indialogue]==-4)whichsoundplay=consolefailsound; - PlaySoundEx( whichsoundplay, samp[whichsoundplay], NULL, true); - OPENAL_3D_SetAttributes(channels[whichsoundplay], gLoc, vel); - OPENAL_SetVolume(channels[whichsoundplay], 256); - OPENAL_SetPaused(channels[whichsoundplay], false); + emit_sound_at(whichsoundplay, player[participantfocus[whichdialogue][indialogue]].coords); } } }