From: Mircea Kitsune Date: Mon, 22 Mar 2010 21:03:14 +0000 (+0200) Subject: Fixes an issue with custom announcers causing players to hear announcement sounds... X-Git-Tag: xonotic-v0.1.0preview~678^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2ab51d22b2a001f2314e8bd688521ed99753fd4d;p=xonotic%2Fxonotic-data.pk3dir.git Fixes an issue with custom announcers causing players to hear announcement sounds from bots. --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index c8fee27ae..0b6f3fd0b 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -13,10 +13,13 @@ void Announce(string snd) { } void AnnounceTo(entity e, string snd) { - msg_entity = e; - WriteByte(MSG_ONE, SVC_TEMPENTITY); - WriteByte(MSG_ONE, TE_CSQC_ANNOUNCE); - WriteString(MSG_ONE, snd); + if (clienttype(e) == CLIENTTYPE_REAL) + { + msg_entity = e; + WriteByte(MSG_ONE, SVC_TEMPENTITY); + WriteByte(MSG_ONE, TE_CSQC_ANNOUNCE); + WriteString(MSG_ONE, snd); + } } float ClientData_Send(entity to, float sf)