From: terencehill Date: Fri, 29 Mar 2019 16:31:27 +0000 (+0100) Subject: Fix #2209 "Jetpack sound continues forever after death by trigger" X-Git-Tag: xonotic-v0.8.5~1569 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e31a68222c58e2e808b1226b4c558bb8efa43321;p=xonotic%2Fxonotic-data.pk3dir.git Fix #2209 "Jetpack sound continues forever after death by trigger" --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 939e5d77f..a06419556 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -601,6 +601,11 @@ void CSQCModel_Hook_PreDraw(entity this, bool isplayer) if(!this.modelindex || this.model == "null" || this.alpha < 0) { this.drawmask = 0; + if(this.snd_looping > 0) + { + sound(this, this.snd_looping, SND_Null, VOL_BASE, autocvar_cl_jetpack_attenuation); + this.snd_looping = 0; + } return; } else