From: terencehill Date: Fri, 8 Mar 2013 17:06:11 +0000 (+0100) Subject: Fix PrintWelcomeMessage executed twice per frame when observing/spectating; also... X-Git-Tag: xonotic-v0.7.0~73^2^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9fd3c7f5357171ffdb2efb56e862abd67fd5dd16;p=xonotic%2Fxonotic-data.pk3dir.git Fix PrintWelcomeMessage executed twice per frame when observing/spectating; also don't send MOTD to bots as they don't really care --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 356d444c0..9c2c47203 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1529,6 +1529,9 @@ void ClientConnect (void) if(clienttype(self) == CLIENTTYPE_REAL) { + if(!autocvar_g_campaign) + Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_MOTD, getwelcomemessage()); + if(autocvar_g_bugrigs || WEPSET_EQ_AW(g_weaponarena_weapons, WEP_TUBA)) stuffcmd(self, "cl_cmd settemp chase_active 1\n"); } @@ -1578,9 +1581,6 @@ void ClientConnect (void) CheatInitClient(); - if(!autocvar_g_campaign) - Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_MOTD, getwelcomemessage()); - CSQCMODEL_AUTOINIT(); self.model_randomizer = random(); @@ -2469,8 +2469,6 @@ void ObserverThink() } } } - - PrintWelcomeMessage(); } void SpectatorThink() @@ -2509,7 +2507,6 @@ void SpectatorThink() PutObserverInServer(); } - PrintWelcomeMessage(); self.flags |= FL_CLIENT | FL_NOTARGET; } @@ -2630,11 +2627,10 @@ void PlayerPreThink (void) self.usekeypressed = self.BUTTON_USE; } - PrintWelcomeMessage(); + if(clienttype(self) == CLIENTTYPE_REAL) + PrintWelcomeMessage(); if(self.classname == "player") { -// if(self.netname == "Wazat") -// bprint(self.classname, "\n"); CheckRules_Player();