[quake3-commits] r2325 - trunk/code/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Oct 17 15:30:41 EDT 2012


Author: ztm
Date: 2012-10-17 15:30:41 -0400 (Wed, 17 Oct 2012)
New Revision: 2325

Modified:
   trunk/code/client/snd_openal.c
Log:
Check last listener number instead of clc.clientNum in S_AL_HearingThroughEntity so sound work correctly when spectate following a client. (Related to bug 5741.)

Modified: trunk/code/client/snd_openal.c
===================================================================
--- trunk/code/client/snd_openal.c	2012-10-13 23:15:02 UTC (rev 2324)
+++ trunk/code/client/snd_openal.c	2012-10-17 19:30:41 UTC (rev 2325)
@@ -540,6 +540,7 @@
 static int srcCount = 0;
 static int srcActiveCnt = 0;
 static qboolean alSourcesInitialised = qfalse;
+static int lastListenerNumber = -1;
 static vec3_t lastListenerOrigin = { 0.0f, 0.0f, 0.0f };
 
 typedef struct sentity_s
@@ -640,7 +641,7 @@
 {
 	float	distanceSq;
 
-	if( clc.clientNum == entityNum )
+	if( lastListenerNumber == entityNum )
 	{
 		// FIXME: <tim at ngus.net> 28/02/06 This is an outrageous hack to detect
 		// whether or not the player is rendering in third person or not. We can't
@@ -2151,6 +2152,7 @@
 	orientation[0] = axis[0][0]; orientation[1] = axis[0][1]; orientation[2] = axis[0][2];
 	orientation[3] = axis[2][0]; orientation[4] = axis[2][1]; orientation[5] = axis[2][2];
 
+	lastListenerNumber = entityNum;
 	VectorCopy( sorigin, lastListenerOrigin );
 
 	// Set OpenAL listener paramaters



More information about the quake3-commits mailing list