]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
If weapon entity is deleted, delete its hook too
authorMario <mario@smbclan.net>
Mon, 26 Dec 2016 12:34:36 +0000 (22:34 +1000)
committerMario <mario@smbclan.net>
Mon, 26 Dec 2016 12:34:36 +0000 (22:34 +1000)
qcsrc/server/weapons/weaponsystem.qc

index 18675f0d5763b8d91b49588f2a695d22eb21c639..93d2af55b49c94ec83fe07c400cf3ac75254a931 100644 (file)
@@ -76,6 +76,7 @@ void CL_Weaponentity_Think(entity this)
        {
                // owner has new gun; remove old one
                if (this.weaponchild) delete(this.weaponchild);
+               if (this.hook) delete(this.hook);
                delete(this);
                return;
        }