{
string snd = ReadString();
snd = strcat("chat/", snd, ".ogg");
+ LOG_INFOF("Client got chat sound %s", snd);
precache_sound(snd);
_sound(NULL, CH_INFO, snd, VOL_BASE, ATTN_NONE);
bool play_chatsound(entity source, string msgin)
{
- if(autocvar_sv_chat_sounds && CS(source).cvar_cl_chat_sounds) {
+ if(autocvar_sv_chat_sounds && CS_CVAR(source).cvar_cl_chat_sounds) {
var .float flood_sound = floodcontrol_chatsound;
if (source.(flood_sound) < time - autocvar_sv_chat_sounds_flood) {
FOREACH_WORD(autocvar_sv_chat_sounds_list, it == rawmsg, { found = true; });
if (found) {
- FOREACH_CLIENT(IS_REAL_CLIENT(it) && CS(it).cvar_cl_chat_sounds, {
+ FOREACH_CLIENT(IS_REAL_CLIENT(it) && CS_CVAR(it).cvar_cl_chat_sounds, {
msg_entity = it;
WriteHeader(MSG_ONE, TE_CSQC_CHATSOUND);
WriteString(MSG_ONE, rawmsg);