]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/target/music.qc
Merge branch 'TimePath/strfree' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / target / music.qc
index 4e7952170018a4448ed8cb56bfc0ea9b2604f764..47977f267eff651f01575b1a13fddf01956f9640 100644 (file)
@@ -221,8 +221,7 @@ void Net_TargetMusic()
                if(getsoundtime(e, CH_BGM_SINGLE) < 0)
                {
                        LOG_TRACEF("Cannot initialize sound %s", e.noise);
-                       strunzone(e.noise);
-                       e.noise = string_null;
+                       strfree(e.noise);
                }
        }
        e.volume = vol;
@@ -260,9 +259,7 @@ void Ent_TriggerMusic_Think(entity this)
 
 void Ent_TriggerMusic_Remove(entity this)
 {
-       if(this.noise)
-               strunzone(this.noise);
-       this.noise = string_null;
+    strfree(this.noise);
 }
 
 NET_HANDLE(ENT_CLIENT_TRIGGER_MUSIC, bool isnew)
@@ -298,8 +295,7 @@ NET_HANDLE(ENT_CLIENT_TRIGGER_MUSIC, bool isnew)
                        if(getsoundtime(this, CH_BGM_SINGLE) < 0)
                        {
                                LOG_TRACEF("Cannot initialize sound %s", this.noise);
-                               strunzone(this.noise);
-                               this.noise = string_null;
+                               strfree(this.noise);
                        }
                }
        }