]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/target/speaker.qc
Add support for pitch shifting to the QC sound sending implementation, apply pitch...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / target / speaker.qc
index 354f4ca6f6f2adbb3f6613d5d091f990dfc50784..6766139c5db5008758d1c203a52594dd599e7641 100644 (file)
@@ -28,7 +28,7 @@ void target_speaker_use_activator(entity this, entity actor, entity trigger)
        else
                snd = this.noise;
        msg_entity = actor;
-       soundto(MSG_ONE, this, CH_TRIGGER, snd, VOL_BASE * this.volume, this.atten);
+       soundto(MSG_ONE, this, CH_TRIGGER, snd, VOL_BASE * this.volume, this.atten, 0);
 }
 void target_speaker_use_on(entity this, entity actor, entity trigger)
 {
@@ -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;