}
if(e.noise != noi)
{
- if(e.noise)
- strunzone(e.noise);
- e.noise = strzone(noi);
+ strcpy(e.noise, noi);
precache_sound(e.noise);
_sound(e, CH_BGM_SINGLE, e.noise, 0, ATTEN_NONE);
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;
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)
this.fade_time = ReadByte() / 16.0;
this.fade_rate = ReadByte() / 16.0;
string s = this.noise;
- if(this.noise)
- strunzone(this.noise);
- this.noise = strzone(ReadString());
+ strcpy(this.noise, ReadString());
if(this.noise != s)
{
precache_sound(this.noise);
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);
}
}
}