]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix PrintWelcomeMessage executed twice per frame when observing/spectating; also...
authorterencehill <piuntn@gmail.com>
Fri, 8 Mar 2013 17:06:11 +0000 (18:06 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 8 Mar 2013 17:21:04 +0000 (18:21 +0100)
qcsrc/server/cl_client.qc

index 356d444c0c8a46918d573da4b036756243c6b1ef..9c2c47203fa98116ed0625c3ff6408f3c685077a 100644 (file)
@@ -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();