]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Merge commit '54e0ccd220df'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index 6f757318324c48767f798b071aa12262bbcb33b4..ef83ef63543c7dc1a77c1633be408fb5ba45a0c1 100644 (file)
@@ -13,10 +13,13 @@ void Announce(string snd) {
 }
 
 void AnnounceTo(entity e, string snd) {
-       msg_entity = e;
-       WriteByte(MSG_ONE, SVC_TEMPENTITY);
-       WriteByte(MSG_ONE, TE_CSQC_ANNOUNCE);
-       WriteString(MSG_ONE, snd);
+       if (clienttype(e) == CLIENTTYPE_REAL)
+       {
+               msg_entity = e;
+               WriteByte(MSG_ONE, SVC_TEMPENTITY);
+               WriteByte(MSG_ONE, TE_CSQC_ANNOUNCE);
+               WriteString(MSG_ONE, snd);
+       }
 }
 
 float ClientData_Send(entity to, float sf)
@@ -405,6 +408,7 @@ string CheckPlayerModel(string plyermodel) {
        {
                if(substring(plyermodel,-4,4) != ".zym")
                if(substring(plyermodel,-4,4) != ".dpm")
+               if(substring(plyermodel,-4,4) != ".iqm")
                if(substring(plyermodel,-4,4) != ".md3")
                if(substring(plyermodel,-4,4) != ".psk")
                        return FallbackPlayerModel;
@@ -899,9 +903,6 @@ void PutClientInServer (void)
                        self.weapons = randombits(self.weapons, g_weaponarena_random, FALSE);
 
                self.items = start_items;
-               self.switchweapon = w_getbestweapon(self);
-               self.cnt = self.switchweapon;
-               self.weapon = 0;
                self.jump_interval = time;
 
                self.spawnshieldtime = time + cvar("g_spawnshieldtime");
@@ -1039,6 +1040,10 @@ void PutClientInServer (void)
                self = oldself;
 
                MUTATOR_CALLHOOK(PlayerSpawn);
+
+               self.switchweapon = w_getbestweapon(self);
+               self.cnt = self.switchweapon;
+               self.weapon = 0;
        } else if(self.classname == "observer" || (g_ca && !allowed_to_spawn)) {
                PutObserverInServer ();
        }
@@ -2526,8 +2531,7 @@ void PlayerPreThink (void)
 
                if(frametime)
                {
-                       if(cvar("gameversion") >= 20600) // only do this for 2.6 and above FIXME remove this check when making 2.6
-                               self.glowmod = colormapPaletteColor(self.clientcolors & 0x0F, TRUE) * 2;
+                       self.glowmod = colormapPaletteColor(self.clientcolors & 0x0F, TRUE) * 2;
                        player_powerups();
                }
 
@@ -2847,7 +2851,6 @@ void PlayerPostThink (void)
                        ImpulseCommands();
                if (intermission_running)
                        return;         // intermission or finale
-
                GetPressedKeys();
        } else if (self.classname == "observer") {
                //do nothing