[iortcw] 174/497: SP: Implement talk anims when using OpenAL

Simon McVittie smcv at debian.org
Fri Sep 8 10:36:46 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit ac4dcdf0488acb0edcfc9386b989b17dcf3cd581
Author: M4N4T4RMS at gmail.com <M4N4T4RMS at gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date:   Mon Aug 4 03:48:47 2014 +0000

    SP: Implement talk anims when using OpenAL
---
 SP/code/client/snd_openal.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/SP/code/client/snd_openal.c b/SP/code/client/snd_openal.c
index 856caa9..ac788a4 100644
--- a/SP/code/client/snd_openal.c
+++ b/SP/code/client/snd_openal.c
@@ -1320,6 +1320,14 @@ static void S_AL_MainStartSound( vec3_t origin, int entnum, int entchannel, sfxH
 		return;
 	}
 
+	// Talk anims default to ZERO amplitude
+	memset( s_entityTalkAmplitude, 0, sizeof( s_entityTalkAmplitude ) );
+
+	if ( entnum < MAX_CLIENTS && entchannel == CHAN_VOICE )
+	{
+		s_entityTalkAmplitude[entnum] = (unsigned char)AL_GAIN;
+	}
+
 	// Try to grab a source
 	src = S_AL_SrcAlloc(sfx, SRCPRI_ONESHOT, entnum, entchannel, flags);
 	if(src == -1)
@@ -2335,7 +2343,7 @@ int S_AL_GetVoiceAmplitude( int entityNum ) {
 		return 0;
 	}
 
-	return (int)s_entityTalkAmplitude[entityNum] * 2;
+	return (int)s_entityTalkAmplitude[entityNum] * 18;
 }
 
 //===========================================================================

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list