From: Samual Lenks Date: Sun, 19 Jan 2014 18:50:36 +0000 (-0500) Subject: Move the warning to whenever someone starts spectating, also add another X-Git-Tag: xonotic-v0.8.0~239 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c002730fc4e73762fa77120b026a5bba2bd47ea3;p=xonotic%2Fxonotic-data.pk3dir.git Move the warning to whenever someone starts spectating, also add another check which confirms that the cvar is enabled --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index f6407b2b3..691c4930e 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -186,6 +186,8 @@ void PutObserverInServer (void) if(self.killcount != -666) { Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_QUIT_SPECTATE, self.netname); + if(autocvar_g_chat_nospectators == 1 || (cvar("g_warmup") && !(warmup_stage || gameover) && autocvar_g_chat_nospectators == 2)) + Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_CHAT_NOSPECTATORS); if(self.just_joined == FALSE) { LogTeamchange(self.playerid, -1, 4); @@ -1180,10 +1182,6 @@ void ClientConnect (void) { Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_SPECTATE_WARNING, autocvar_g_maxplayers_spectator_blocktime); } - - if(IS_SPEC(self) || IS_OBSERVER(self)) - if(autocvar_g_chat_nospectators == 1 || (!(warmup_stage || gameover) && autocvar_g_chat_nospectators == 2)) - Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_CHAT_NOSPECTATORS); self.jointime = time; self.allowed_timeouts = autocvar_sv_timeout_number;