Don't play speaker sounds globally if they have the loop flag (possible fix for Q3...
authorMario <mario.mario@y7mail.com>
Wed, 8 Jul 2020 03:07:36 +0000 (13:07 +1000)
committerMario <mario.mario@y7mail.com>
Wed, 8 Jul 2020 03:07:36 +0000 (13:07 +1000)
qcsrc/common/mapobjects/target/speaker.qc

index 354f4ca..e67f4b3 100644 (file)
@@ -83,7 +83,7 @@ spawnfunc(target_speaker)
        if(this.noise)
                precache_sound (this.noise);
 
-       if(!this.atten && (this.spawnflags & SPEAKER_GLOBAL))
+       if(!this.atten && (this.spawnflags & SPEAKER_GLOBAL) && !(this.spawnflags & 3)) // special check for quake 3: looped sounds are never global
        {
                LOG_WARN("target_speaker uses legacy spawnflag GLOBAL (BIT(2)), please set atten to -1 instead");
                this.atten = -1;