]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix #2209 "Jetpack sound continues forever after death by trigger"
authorterencehill <piuntn@gmail.com>
Fri, 29 Mar 2019 16:31:27 +0000 (17:31 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 29 Mar 2019 16:31:27 +0000 (17:31 +0100)
qcsrc/client/csqcmodel_hooks.qc

index 939e5d77fa80dd57c4ae4c7bb4382f413c85917d..a0641955609138a43fc1f396e6c6be54469ee716 100644 (file)
@@ -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