From: bones_was_here Date: Sun, 2 May 2021 14:04:38 +0000 (+1000) Subject: sv_maxidle: Play team chat sound during countdown, and precache misc/talk2 X-Git-Tag: xonotic-v0.8.5~419^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d08fdc28a34361602b65e959c8f4e03200f615b0;p=xonotic%2Fxonotic-data.pk3dir.git 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 --- 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; } }