]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Show a message in the chat box if g_chat_nospectators is enabled
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index 1497d0ab1d056b52031fa8830f746e44494c88c3..f6407b2b39a2785327ce3196ef342c71ce8cf511 100644 (file)
@@ -400,6 +400,9 @@ void PutClientInServer (void)
 
                RemoveGrapplingHook(self); // Wazat's Grappling Hook
 
+               if(self.vehicle)
+                       vehicles_exit(VHEF_RELESE);
+
                self.classname = "player";
                self.wasplayer = TRUE;
                self.iscreature = TRUE;
@@ -1177,6 +1180,10 @@ 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;
@@ -2624,7 +2631,7 @@ void PlayerPostThink (void)
 
        /*
        if(g_race)
-               dprint(sprintf("%f %.6f\n", time, race_GetFractionalLapCount(self)));
+               dprintf("%f %.6f\n", time, race_GetFractionalLapCount(self));
        */
 
        CSQCMODEL_AUTOUPDATE();