]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/weaponsystem.qc
If weapon entity is deleted, delete its hook too
[xonotic/xonotic-data.pk3dir.git] / 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;
        }