bool autocvar_g_chat_tellprivacy;
bool autocvar_g_forced_respawn;
string autocvar_g_forced_team_otherwise; // TODO: Move to teamplay.qc
+bool autocvar_g_chat_sounds; // z411
+string autocvar_g_chat_sounds_list; // z411
+float autocvar_g_chat_sounds_flood; // z411
#define autocvar_g_friendlyfire cvar("g_friendlyfire")
#define autocvar_g_friendlyfire_virtual cvar("g_friendlyfire_virtual")
#define autocvar_g_friendlyfire_virtual_force cvar("g_friendlyfire_virtual_force")
if (autocvar_sv_eventlog && (event_log_msg != "")) {
GameLogEcho(event_log_msg);
}
+
+ var .float flood_sound = floodcontrol_chatsound;
+
+ if(autocvar_g_chat_sounds && sourcemsgstr != "" && ret > 0) {
+ bprintf("%d < %d", source.(flood_sound), time - autocvar_g_chat_sounds_flood);
+
+ if (source.(flood_sound) < time - autocvar_g_chat_sounds_flood) {
+ string rawmsg;
+ rawmsg = strreplace("\n", " ", msgin);
+
+ bprintf("msg is %s and list is %s\n", rawmsg, autocvar_g_chat_sounds_list);
+ if (findinlist_abbrev(rawmsg, autocvar_g_chat_sounds_list)) {
+ bprintf("IN LIST!!!\n");
+ play2all(strcat("sound/chat/", rawmsg, ".ogg"));
+
+ source.(flood_sound) = time;
+ }
+ }
+ }
return ret;
}
.float floodcontrol_chattell;
.float floodcontrol_voice;
.float floodcontrol_voiceteam;
+.float floodcontrol_chatsound;
// respawning
.int respawn_flags;