]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Move the warning to whenever someone starts spectating, also add another
authorSamual Lenks <samual@xonotic.org>
Sun, 19 Jan 2014 18:50:36 +0000 (13:50 -0500)
committerSamual Lenks <samual@xonotic.org>
Sun, 19 Jan 2014 18:50:36 +0000 (13:50 -0500)
check which confirms that the cvar is enabled

qcsrc/server/cl_client.qc

index f6407b2b39a2785327ce3196ef342c71ce8cf511..691c4930e995978bc50135e3185260b659fd6979 100644 (file)
@@ -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;