+#include "music.qh"
#if defined(CSQC)
#elif defined(MENUQC)
#elif defined(SVQC)
#include <common/constants.qh>
+ #include <common/net_linked.qh>
#include <server/constants.qh>
#include <server/defs.qh>
#endif
#ifdef SVQC
+IntrusiveList g_targetmusic_list;
+STATIC_INIT(g_targetmusic_list) { g_targetmusic_list = IL_NEW(); }
+
// values:
// volume
// noise
}
void target_music_kill()
{
- FOREACH_ENTITY_CLASS("target_music", true, {
+ IL_EACH(g_targetmusic_list, true,
+ {
it.volume = 0;
if (it.targetname == "")
target_music_sendto(it, MSG_ALL, 1);
this.reset = target_music_reset;
if(!this.volume)
this.volume = 1;
+ IL_PUSH(g_targetmusic_list, this);
if(this.targetname == "")
target_music_sendto(this, MSG_INIT, 1);
else
}
void TargetMusic_RestoreGame()
{
- FOREACH_ENTITY_CLASS("target_music", true,
+ IL_EACH(g_targetmusic_list, true,
{
if(it.targetname == "")
target_music_sendto(it, MSG_INIT, 1);
_sound(e, CH_BGM_SINGLE, e.noise, 0, ATTEN_NONE);
if(getsoundtime(e, CH_BGM_SINGLE) < 0)
{
- LOG_TRACEF("Cannot initialize sound %s\n", e.noise);
+ LOG_TRACEF("Cannot initialize sound %s", e.noise);
strunzone(e.noise);
e.noise = string_null;
}
_sound(this, CH_BGM_SINGLE, this.noise, 0, ATTEN_NONE);
if(getsoundtime(this, CH_BGM_SINGLE) < 0)
{
- LOG_TRACEF("Cannot initialize sound %s\n", this.noise);
+ LOG_TRACEF("Cannot initialize sound %s", this.noise);
strunzone(this.noise);
this.noise = string_null;
}