From d08fdc28a34361602b65e959c8f4e03200f615b0 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Mon, 3 May 2021 00:04:38 +1000 Subject: [PATCH] sv_maxidle: Play team chat sound during countdown, and precache misc/talk2 I had noticed lag the first time a team chat message appeared when using a mechanical HDD, hopefully this fixes it --- qcsrc/common/sounds/all.inc | 1 + qcsrc/server/client.qc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/sounds/all.inc b/qcsrc/common/sounds/all.inc index b7228d454..d8d60c4a1 100644 --- a/qcsrc/common/sounds/all.inc +++ b/qcsrc/common/sounds/all.inc @@ -277,6 +277,7 @@ SOUND(KILL, "misc/kill"); SOUND(SPAWN, "misc/spawn"); SOUND(TALK, "misc/talk"); +SOUND(TALK2, "misc/talk2"); SOUND(TELEPORT, "misc/teleport"); diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index c0c05e9c7..e988d4bdc 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -2753,8 +2753,8 @@ void PlayerPostThink (entity this) return; } else if (timeleft <= countdown_time) { - if (timeleft != CS(this).idlekick_lasttimeleft && timeleft <= 10) - Send_Notification(NOTIF_ONE, this, MSG_ANNCE, Announcer_PickNumber(CNT_IDLE, timeleft)); + if (timeleft != CS(this).idlekick_lasttimeleft) + play2(this, SND(TALK2)); CS(this).idlekick_lasttimeleft = timeleft; } } -- 2.39.2