Revert "This is somewhat of an experiment in which I try to add global looping sounds ..."

This reverts commit 1fdd793215.
This commit is contained in:
Walter Julius Hennecke 2013-07-18 23:14:41 +02:00
parent 1fdd793215
commit 21602f912e
4 changed files with 2 additions and 32 deletions

View file

@ -110,25 +110,7 @@ static void CG_EntityEffects( centity_t *cent ) {
CG_SetEntitySoundPosition( cent );
// add loop sound
if(cent->currentState.eType == ET_GLOBALSPEAKER) {
// This is an attempt to create global loop sounds. We'll the if it works ...
// The idea is to use the player as sound source for any loopsoung marked as global.
// This way it should be ensured that the player always hears the sound.
if(cent->currentState.loopSound && cent->currentState.loopSound < 256) {
centity_t* c = NULL;
int i = 0;
for( ; i < MAX_CLIENTS; i++) {
c = &cg_entities[i];
if(c->currentState.clientNum == cg.snap->ps.clientNum) {
break;
}
}
trap_S_AddLoopingSound(c->currentState.number, c->lerpOrigin, vec3_origin, cgs.gameSounds[cent->currentState.loopSound]);
}
} else if ( cent->currentState.loopSound && cent->currentState.loopSound < 256) {
if ( cent->currentState.loopSound && cent->currentState.loopSound < 256 ) {
trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin,
cgs.gameSounds[ cent->currentState.loopSound ] );
}
@ -949,7 +931,6 @@ static void CG_AddCEntity( centity_t *cent ) {
CG_Portal( cent );
break;
case ET_SPEAKER:
case ET_GLOBALSPEAKER:
CG_Speaker( cent );
break;
case ET_LASER:

View file

@ -1010,7 +1010,6 @@ typedef enum {
ET_BEAM,
ET_PORTAL,
ET_SPEAKER,
ET_GLOBALSPEAKER,
ET_PUSH_TRIGGER,
ET_TELEPORT_TRIGGER,
ET_INVISIBLE,

View file

@ -647,9 +647,6 @@ void Svcmd_EntityList_f (void) {
case ET_SPEAKER:
G_Printf("ET_SPEAKER ");
break;
case ET_GLOBALSPEAKER:
G_Printf("ET_GLOBALSPEAKER ");
break;
case ET_PUSH_TRIGGER:
G_Printf("ET_PUSH_TRIGGER ");
break;
@ -695,9 +692,6 @@ void Svcmd_EntityList_f (void) {
case ET_SPEAKER:
G_Printf("ET_SPEAKER ");
break;
case ET_GLOBALSPEAKER:
G_Printf("ET_GLOBALSPEAKER ");
break;
case ET_PUSH_TRIGGER:
G_Printf("ET_PUSH_TRIGGER ");
break;

View file

@ -302,11 +302,7 @@ void SP_target_speaker( gentity_t *ent ) {
}
// a repeating speaker can be done completely client side
if((ent->spawnflags & 4) != 0) {
ent->s.eType = ET_GLOBALSPEAKER;
} else {
ent->s.eType = ET_SPEAKER;
}
ent->s.eType = ET_SPEAKER;
ent->s.eventParm = ent->noise_index;
ent->s.frame = (int)(ent->wait * 10);
ent->s.clientNum = (int)(ent->random * 10);