diff options
author | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2007-01-24 21:23:21 +0000 |
---|---|---|
committer | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2007-01-24 21:23:21 +0000 |
commit | f22191f25976f39d1467b6fd9e523fe96d900a7d (patch) | |
tree | f4384687e0aa0057b4c2c0f72701fb44a66a5ca6 /code/client | |
parent | 6d74e13451e79441dc45419d5a46f4fbf0256a98 (diff) | |
download | ioquake3-aero-f22191f25976f39d1467b6fd9e523fe96d900a7d.tar.gz ioquake3-aero-f22191f25976f39d1467b6fd9e523fe96d900a7d.zip |
- Fix loads of format string bugs
- Fix locally looping sounds, thanks to Timbo
git-svn-id: svn://svn.icculus.org/quake3/trunk@1037 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/client')
-rw-r--r-- | code/client/cl_cgame.c | 2 | ||||
-rw-r--r-- | code/client/cl_ui.c | 2 | ||||
-rw-r--r-- | code/client/qal.c | 2 | ||||
-rw-r--r-- | code/client/snd_dma.c | 12 | ||||
-rw-r--r-- | code/client/snd_openal.c | 10 |
5 files changed, 13 insertions, 15 deletions
diff --git a/code/client/cl_cgame.c b/code/client/cl_cgame.c index 4ebacb1..e2c682e 100644 --- a/code/client/cl_cgame.c +++ b/code/client/cl_cgame.c @@ -698,7 +698,7 @@ intptr_t CL_CgameSystemCalls( intptr_t *args ) { default: assert(0); // bk010102 - Com_Error( ERR_DROP, "Bad cgame system trap: %i", args[0] ); + Com_Error( ERR_DROP, "Bad cgame system trap: %ld", (long int) args[0] ); } return 0; } diff --git a/code/client/cl_ui.c b/code/client/cl_ui.c index 0dc8774..45c0c37 100644 --- a/code/client/cl_ui.c +++ b/code/client/cl_ui.c @@ -1109,7 +1109,7 @@ intptr_t CL_UISystemCalls( intptr_t *args ) { default: - Com_Error( ERR_DROP, "Bad UI system trap: %i", args[0] ); + Com_Error( ERR_DROP, "Bad UI system trap: %ld", (long int) args[0] ); } diff --git a/code/client/qal.c b/code/client/qal.c index cfef944..1f73312 100644 --- a/code/client/qal.c +++ b/code/client/qal.c @@ -153,7 +153,7 @@ static void *GPA(char *str) } else { - Com_DPrintf( " Loaded symbol %s (0x%08X)\n", str, rv); + Com_DPrintf( " Loaded symbol %s (%p)\n", str, rv); return rv; } } diff --git a/code/client/snd_dma.c b/code/client/snd_dma.c index 57ccea5..0b6b56d 100644 --- a/code/client/snd_dma.c +++ b/code/client/snd_dma.c @@ -109,7 +109,7 @@ void S_Base_SoundInfo(void) { Com_Printf("%5d samplebits\n", dma.samplebits); Com_Printf("%5d submission_chunk\n", dma.submission_chunk); Com_Printf("%5d speed\n", dma.speed); - Com_Printf("0x%x dma buffer\n", dma.buffer); + Com_Printf("%p dma buffer\n", dma.buffer); if ( s_backgroundStream ) { Com_Printf("Background file: %s\n", s_backgroundLoop ); } else { @@ -466,7 +466,7 @@ void S_Base_StartSound(vec3_t origin, int entityNum, int entchannel, sfxHandle_t } if ( sfxHandle < 0 || sfxHandle >= s_numSfx ) { - Com_Printf( S_COLOR_YELLOW, "S_StartSound: handle %i out of range\n", sfxHandle ); + Com_Printf( S_COLOR_YELLOW "S_StartSound: handle %i out of range\n", sfxHandle ); return; } @@ -578,7 +578,7 @@ void S_Base_StartLocalSound( sfxHandle_t sfxHandle, int channelNum ) { } if ( sfxHandle < 0 || sfxHandle >= s_numSfx ) { - Com_Printf( S_COLOR_YELLOW, "S_StartLocalSound: handle %i out of range\n", sfxHandle ); + Com_Printf( S_COLOR_YELLOW "S_StartLocalSound: handle %i out of range\n", sfxHandle ); return; } @@ -687,7 +687,7 @@ void S_Base_AddLoopingSound( int entityNum, const vec3_t origin, const vec3_t ve } if ( sfxHandle < 0 || sfxHandle >= s_numSfx ) { - Com_Printf( S_COLOR_YELLOW, "S_AddLoopingSound: handle %i out of range\n", sfxHandle ); + Com_Printf( S_COLOR_YELLOW "S_AddLoopingSound: handle %i out of range\n", sfxHandle ); return; } @@ -750,7 +750,7 @@ void S_Base_AddRealLoopingSound( int entityNum, const vec3_t origin, const vec3_ } if ( sfxHandle < 0 || sfxHandle >= s_numSfx ) { - Com_Printf( S_COLOR_YELLOW, "S_AddRealLoopingSound: handle %i out of range\n", sfxHandle ); + Com_Printf( S_COLOR_YELLOW "S_AddRealLoopingSound: handle %i out of range\n", sfxHandle ); return; } @@ -1115,7 +1115,7 @@ void S_Base_Update( void ) { ch = s_channels; for (i=0 ; i<MAX_CHANNELS; i++, ch++) { if (ch->thesfx && (ch->leftvol || ch->rightvol) ) { - Com_Printf ("%f %f %s\n", ch->leftvol, ch->rightvol, ch->thesfx->soundName); + Com_Printf ("%d %d %s\n", ch->leftvol, ch->rightvol, ch->thesfx->soundName); total++; } } diff --git a/code/client/snd_openal.c b/code/client/snd_openal.c index 26628df..b20e411 100644 --- a/code/client/snd_openal.c +++ b/code/client/snd_openal.c @@ -530,15 +530,13 @@ Adapt the gain if necessary to get a quicker fadeout when the source is too far static void S_AL_ScaleGain(src_t *chksrc, vec3_t origin) { float distance; - - if(chksrc->local) - distance = VectorLength(origin); - else + + if(!chksrc->local) distance = Distance(origin, lastListenerOrigin); - + // If we exceed a certain distance, scale the gain linearly until the sound // vanishes into nothingness. - if((distance -= s_alMaxDistance->value) > 0) + if(!chksrc->local && (distance -= s_alMaxDistance->value) > 0) { float scaleFactor; |