Fixed a quake 3 bug. Fixed looping target_speakers not stopping

their sound when triggered. Thanks to Eraser from EntityPlus
This commit is contained in:
q3rally 2011-07-24 09:09:13 +00:00
parent 70a22a9a8b
commit 554ca94331

View file

@ -132,7 +132,7 @@ static void CG_EntityEffects( centity_t *cent ) {
CG_SetEntitySoundPosition( cent );
// add loop sound
if ( cent->currentState.loopSound ) {
if ( cent->currentState.loopSound) {
if (cent->currentState.eType != ET_SPEAKER) {
trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin,
cgs.gameSounds[ cent->currentState.loopSound ] );
@ -141,6 +141,9 @@ static void CG_EntityEffects( centity_t *cent ) {
cgs.gameSounds[ cent->currentState.loopSound ] );
}
}
else {
trap_S_StopLoopingSound(cent->currentState.number);
}
// constant light glow