From e31a68222c58e2e808b1226b4c558bb8efa43321 Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 29 Mar 2019 17:31:27 +0100 Subject: [PATCH] Fix #2209 "Jetpack sound continues forever after death by trigger" --- qcsrc/client/csqcmodel_hooks.qc | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.39.2