]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
sv_maxidle: Play team chat sound during countdown, and precache misc/talk2
authorbones_was_here <bones_was_here@xa.org.au>
Sun, 2 May 2021 14:04:38 +0000 (00:04 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Sun, 2 May 2021 14:04:38 +0000 (00:04 +1000)
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
qcsrc/server/client.qc

index b7228d454caf822f1ee50be47441fd34f8818f51..d8d60c4a129a987cd297caaa549dab804318d1ec 100644 (file)
@@ -277,6 +277,7 @@ SOUND(KILL, "misc/kill");
 SOUND(SPAWN, "misc/spawn");
 
 SOUND(TALK, "misc/talk");
+SOUND(TALK2, "misc/talk2");
 
 SOUND(TELEPORT, "misc/teleport");
 
index c0c05e9c759563ae40f483c738c9f9a2566a0dc3..e988d4bdc9f9b88883bd182fb65c77a452398a78 100644 (file)
@@ -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;
                        }
                }