]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 354f4ca6f6f2adbb3f6613d5d091f990dfc50784..e67f4b34cdb412257d1c20054e5e4920d8829afe 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;