From 4a695e0dad844765857e378ea92eada665d3c875 Mon Sep 17 00:00:00 2001 From: driAn Date: Mon, 2 Jun 2008 18:05:07 +0000 Subject: [PATCH] sound cleanups git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2140 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/sound.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/source/src/sound.cpp b/source/src/sound.cpp index 4e605d2a..526eb6ce 100644 --- a/source/src/sound.cpp +++ b/source/src/sound.cpp @@ -443,7 +443,7 @@ struct location if(inuse) return; p = d; e = NULL; - if(p == camera1) sourcerelative(true); + if(p==camera1) sourcerelative(true); } void attachtoworldobj(const vec *v) @@ -491,8 +491,8 @@ struct location // default settings sourcerelative(false); alSourcef(id, AL_REFERENCE_DISTANCE, 1.0f); - alSource3f(id, AL_POSITION, 0.0, 0.0, 0.0); - alSource3f(id, AL_VELOCITY, 0.0, 0.0, 0.0); + alSource3f(id, AL_POSITION, 0.0f, 0.0f, 0.0f); + alSource3f(id, AL_VELOCITY, 0.0f, 0.0f, 0.0f); alSourcef(id, AL_PITCH, 1.0f); } @@ -538,10 +538,7 @@ struct location { if(p) // players { - if(p != camera1) - { - alSourcefv(id, AL_POSITION, (ALfloat *) &p->o); - } + if(p!=camera1) alSourcefv(id, AL_POSITION, (ALfloat *) &p->o); } else if(e) // entities {