24#define REGISTER_PLAYERSOUND(id) \
25 .string _playersound_##id; \
26 REGISTER(PlayerSounds, playersound, id, m_id, new_pure(PlayerSound)) \
28 this.m_playersoundstr = #id; \
29 this.m_playersoundfld = _playersound_##id; \
37 FOREACH(PlayerSounds,
true, it.m_id = i);
54#define REGISTER_VOICEMSG(id, vt, listed) \
55 .string _playersound_##id; \
56 REGISTER(PlayerSounds, playersound, id, m_id, new_pure(VoiceMessage)) \
58 this.instanceOfVoiceMessage = listed; \
59 this.m_playersoundstr = #id; \
60 this.m_playersoundfld = _playersound_##id; \
61 this.m_playersoundvt = vt; \
98#define REGISTER_GLOBALSOUND(id, str) \
99 REGISTER(GlobalSounds, GS, id, m_id, new_pure(GlobalSound)) \
101 this.m_globalsoundstr = str; \
109 FOREACH(GlobalSounds,
true, it.m_id = i);
141 #define GlobalSound(this, def, chan, vol, voicetype) _GlobalSound(this, def, NULL, string_null, chan, vol, voicetype, false)
142 #define GlobalSound_string(this, def, chan, vol, voicetype) _GlobalSound(this, NULL, NULL, def, chan, vol, voicetype, false)
143 #define PlayerSound(this, def, chan, vol, voicetype) _GlobalSound(this, NULL, def, string_null, chan, vol, voicetype, false)
144 #define VoiceMessage(this, def, msg) \
147 int voicetype = VM.m_playersoundvt; \
148 bool ownteam = (voicetype == VOICETYPE_TEAMRADIO); \
149 int flood = Say(this, ownteam, NULL, msg, true); \
151 if (IS_SPEC(this) || IS_OBSERVER(this) || flood < 0) fake = true; \
152 else if (flood > 0) fake = false; \
154 _GlobalSound(this, NULL, VM, string_null, CH_VOICE, VOL_BASEVOICE, voicetype, fake); \
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
entity GetVoiceMessage(string type)
void UpdatePlayerSounds(entity this)
bool LoadPlayerSounds(entity this, string f, bool strict)
string GetVoiceMessageSampleField(string type)
string GetPlayerSoundSampleField(string type)
float GlobalSound_pitch(float _pitch)
void ClearPlayerSounds(entity this)
string GlobalSound_sample(string pair, float r)
void PrecachePlayerSounds(string f)
void PrecacheGlobalSound(string samplestring)
const int VOICETYPE_LASTATTACKER
bool GetPlayerSoundSampleField_notFound
#define REGISTER_VOICEMSG(id, vt, listed)
const int VOICETYPE_LASTATTACKER_ONLY
#define REGISTER_GLOBALSOUND(id, str)
bool autocvar_g_debug_globalsounds
Use new sound handling.
const int VOICETYPE_TAUNT
const int VOICETYPE_PLAYERSOUND
void _GlobalSound(entity this, entity gs, entity ps, string sample, float chan, float vol, float voicetype, bool fake)
const int VOICETYPE_AUTOTAUNT
bool autocvar_sv_autotaunt
bool instanceOfVoiceMessage
#define REGISTER_PLAYERSOUND(id)
const int VOICETYPE_TEAMRADIO
#define FOREACH(list, cond, body)
#define REPLICATE_INIT(type, name)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
#define REGISTRY_SORT(...)
#define REGISTER_REGISTRY(id)
#define REGISTRY(id, max)
Declare a new registry.
#define REGISTRY_CHECK(id)
#define REGISTRY_DEFINE_GET(id, null)
#define STATIC_INIT(func)
during worldspawn
#define PRECACHE(func)
directly after STATIC_INIT_LATE