]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Add feature to warmup_allguns which only provides weapons in the map
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index 64fe9fdaae40efa55d52cc24685ddcaa3dc676b0..d53fe2082309958f83602af3d5556a42285367ee 100644 (file)
@@ -297,7 +297,13 @@ void FixPlayermodel()
 
                n = tokenize_console(defaultmodel);
                if(n > 0)
+               {
                        defaultmodel = argv(floor(n * self.model_randomizer));
+                       // However, do NOT randomize if the player-selected model is in the list.
+                       for (i = 0; i < n; ++i)
+                               if ((argv(i) == self.playermodel && defaultskin == stof(self.playerskin)) || argv(i) == strcat(self.playermodel, ":", self.playerskin))
+                                       defaultmodel = argv(i);
+               }
 
                i = strstrofs(defaultmodel, ":", 0);
                if(i >= 0)
@@ -433,7 +439,11 @@ void PutClientInServer (void)
                        self.ammo_fuel = warmup_start_ammo_fuel;
                        self.health = warmup_start_health;
                        self.armorvalue = warmup_start_armorvalue;
-                       self.weapons = warmup_start_weapons;
+                       
+                       if(g_warmup_allguns == 2)
+                               self.weapons = warmup_start_weapons;
+                       else if(g_warmup_allguns == 1)
+                               self.weapons = (warmup_start_weapons & (weaponsInMap | start_weapons));
                }
                else
                {
@@ -2039,7 +2049,7 @@ void PrintWelcomeMessage()
        {
                if(self.BUTTON_INFO) // BUTTON_INFO hides initial MOTD
                        self.motd_actived_time = -2; // wait until BUTTON_INFO gets released
-               else if(self.motd_actived_time == -2 || IS_PLAYER(self) || time - self.jointime > autocvar_welcome_message_time)
+               else if(self.motd_actived_time == -2 || IS_PLAYER(self))
                {
                        // instanctly hide MOTD
                        self.motd_actived_time = 0;