X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmapobjects%2Ffunc%2Fdoor.qc;fp=qcsrc%2Fcommon%2Fmapobjects%2Ffunc%2Fdoor.qc;h=d3c042ef93dae155463cfff3f6b012803b88f799;hp=05fafa4f026dc0ab881e12a28b6a87ca911dbfed;hb=350dd64390082f01f29e0d4e4ef70390ba700219;hpb=94ce674f701e458c74a0fe731cfc889fc6c01273 diff --git a/qcsrc/common/mapobjects/func/door.qc b/qcsrc/common/mapobjects/func/door.qc index 05fafa4f02..d3c042ef93 100644 --- a/qcsrc/common/mapobjects/func/door.qc +++ b/qcsrc/common/mapobjects/func/door.qc @@ -653,12 +653,25 @@ void door_init_shared(entity this) } // TODO: other soundpacks - if (this.sounds > 0) + if (this.sounds > 0 || q3compat) { + // Doors in Q3 always have sounds (they're hard coded in Q3 engine) this.noise2 = "plats/medplat1.wav"; this.noise1 = "plats/medplat2.wav"; } + if (q3compat) + { + // CPMA adds these fields for overriding the engine sounds + string s = GetField_fullspawndata(this, "sound_start", true); + string e = GetField_fullspawndata(this, "sound_end", true); + + if (s) + this.noise2 = strzone(s); + if (e) + this.noise1 = strzone(e); + } + // sound when door stops moving if(this.noise1 && this.noise1 != "") { @@ -737,7 +750,7 @@ spawnfunc(func_door) } else if (!this.speed) { - if (autocvar_sv_q3defragcompat) + if (q3compat) this.speed = 400; else this.speed = 100;