/*
=================
S_AL_AddLoopingSound
=================
*/
static
void S_AL_AddLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx )
{
	if(S_AL_CheckInput(entityNum, sfx))
		return;

	S_AL_SanitiseVector( (vec_t *)origin );
	S_AL_SanitiseVector( (vec_t *)velocity );
	S_AL_SrcLoop(SRCPRI_ENTITY, sfx, origin, velocity, entityNum);
}
Beispiel #2
0
/*
=================
S_AL_AddLoopingSound
=================
*/
static
void S_AL_AddLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx )
{
	vec3_t sanOrigin, sanVelocity;

	if(S_AL_CheckInput(entityNum, sfx))
		return;

	VectorCopy( origin, sanOrigin );
	VectorCopy( velocity, sanVelocity );
	S_AL_SanitiseVector( sanOrigin );
	S_AL_SanitiseVector( sanVelocity );

	S_AL_SrcLoop(SRCPRI_ENTITY, sfx, sanOrigin, sanVelocity, entityNum);
}
/*
=================
S_AL_AddRealLoopingSound
=================
*/
static
void S_AL_AddRealLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx )
{
	if(S_AL_CheckInput(entityNum, sfx))
		return;

	S_AL_SanitiseVector( (vec_t *)origin );
	S_AL_SanitiseVector( (vec_t *)velocity );

	// There are certain maps (*cough* Q3:TA mpterra*) that have large quantities
	// of ET_SPEAKERS in the PVS at any given time. OpenAL can't cope with mixing
	// large numbers of sounds, so this culls them by distance
	if( DistanceSquared( origin, lastListenerOrigin ) > (s_alMaxDistance->value + s_alGraceDistance->value) *
							    (s_alMaxDistance->value + s_alGraceDistance->value) )
		return;

	S_AL_SrcLoop(SRCPRI_AMBIENT, sfx, origin, velocity, entityNum);
}