53 if (it.targetname ==
"")
70 target_music_sendto(this, MSG_ONE, true);
89 if(it.targetname ==
"")
113 if(this.
model !=
"null")
151 _setmodel(
this, this.
model);
160 setsize(
this,
'0 0 0', this.
maxs - this.
mins);
175 TargetMusic_list =
LL_NEW();
190 LL_EACH(TargetMusic_list, it.noise, {
191 const float vol0 = (getsoundtime(it, CH_BGM_SINGLE) >= 0) ? it.lastvol : -1;
195 it.state = (it.fade_time > 0) ? bound(0, it.state + frametime / it.fade_time, 1) : 1;
200 it.state = (it.fade_rate > 0) ? bound(0, it.state - frametime / it.fade_rate, 1) : 0;
224 const int id = ReadShort();
225 const float vol =
ReadByte() / 255.0;
226 const float fai =
ReadByte() / 16.0;
227 const float fao =
ReadByte() / 16.0;
232 LL_EACH(TargetMusic_list, it.count ==
id, { e = it; break; });
245 LOG_TRACEF(
"Cannot initialize sound %s", e.noise);
268 e.lifetime =
time + tim;
291NET_HANDLE(ENT_CLIENT_TRIGGER_MUSIC,
bool isnew)
315 string s = this.
noise;
333 setorigin(
this, this.
origin);
334 setsize(
this, this.
mins, this.
maxs);
338 LL_PUSH(TargetMusic_list,
this);
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
limitations: NULL cannot be present elements can only be present once a maximum of IL_MAX lists can e...
IntrusiveList g_drawables
float cvar_settemp(string tmp_cvar, string tmp_value)
const int SF_TRIGGER_INIT
const int SF_TRIGGER_UPDATE
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define IL_EACH(this, cond, body)
#define NET_HANDLE(id, param)
#define WriteHeader(to, id)
#define REGISTER_NET_LINKED(id)
void Net_LinkEntity(entity e, bool docull, float dt, bool(entity this, entity to, int sendflags) sendfunc)
#define REGISTER_NET_TEMP(id)
float WarpZoneLib_BoxTouchesBrush(vector mi, vector ma, entity e, entity ig)
#define LL_EACH(list, cond, body)
entity LL_PUSH(LinkedList this, entity e)
Push to tail.
void trigger_music_reset(entity this)
IntrusiveList g_targetmusic_list
void target_music_use(entity this, entity actor, entity trigger)
void TargetMusic_RestoreGame()
void target_music_sendto(entity this, int to, bool is)
bool trigger_music_SendEntity(entity this, entity to, int sendflags)
void target_music_reset(entity this)
void Ent_TriggerMusic_Remove(entity this)
const int SF_MUSIC_ORIGIN
void Ent_TriggerMusic_Think(entity this)
void TargetMusic_Advance()
#define new_pure(class)
purely logical entities (not linked to the area grid)
#define _sound(e, c, s, v, a)
#define STATIC_INIT(func)
during worldspawn
if(frag_attacker.flagcarried)
void generic_netlinked_legacy_use(entity this, entity actor, entity trigger)
void generic_netlinked_setactive(entity this, int act)
#define IS_REAL_CLIENT(v)
#define FOREACH_CLIENT(cond, body)