9 bool autocvar_g_debug_globalsounds =
false;
10 bool autocvar_sv_taunt;
11 bool autocvar_sv_autotaunt;
21 REPLICATE_INIT(
float, cvar_cl_voice_directional_taunt_attenuation);
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);
140 void _GlobalSound(
entity this,
entity gs,
entity ps,
string sample,
float chan,
float vol,
float voicetype,
bool fake);
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); \ 162 FOREACH(PlayerSounds, it.instanceOfVoiceMessage, allvoicesamples =
strcat(allvoicesamples,
" ", it.m_playersoundstr));
REPLICATE_INIT(float, cvar_cl_autotaunt)
float LoadPlayerSounds(entity this, string f, bool strict)
const int VOICETYPE_PLAYERSOUND
#define REGISTER_PLAYERSOUND(id)
void PrecachePlayerSounds(string f)
string GetVoiceMessageSampleField(string type)
const int VOICETYPE_TAUNT
bool instanceOfVoiceMessage
string GlobalSound_sample(string pair, float r)
#define REGISTER_VOICEMSG(id, vt, listed)
#define REGISTER_GLOBALSOUND(id, str)
#define REGISTRY_CHECK(id)
const int VOICETYPE_AUTOTAUNT
#define REGISTRY_SORT(...)
void ClearPlayerSounds(entity this)
#define REGISTER_REGISTRY(id)
#define REGISTRY_DEFINE_GET(id, null)
const int VOICETYPE_LASTATTACKER
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
bool GetPlayerSoundSampleField_notFound
float GlobalSound_pitch(float _pitch)
#define REGISTRY(id, max)
Declare a new registry.
void PrecacheGlobalSound(string samplestring)
STATIC_INIT(PlayerSounds_renumber)
void UpdatePlayerSounds(entity this)
string GetPlayerSoundSampleField(string type)
entity GetVoiceMessage(string type)
#define FOREACH(list, cond, body)
const int VOICETYPE_LASTATTACKER_ONLY
const int VOICETYPE_TEAMRADIO