]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_player.qc
Remove a compile-time message
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_player.qc
index 82fed046a0829f80a53ad1a515dbe1cedad75db8..e194b026f9dd1b802e115a6b67f389c9d1c97798 100644 (file)
@@ -154,7 +154,7 @@ void player_anim ()
        if(self.crouch)
                animbits |= ANIMSTATE_DUCK;
        animdecide_setstate(self, animbits, false);
-       animdecide_setimplicitstate(self, (self.flags & FL_ONGROUND));
+       animdecide_setimplicitstate(self, (IS_ONGROUND(self)));
 }
 
 void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
@@ -588,7 +588,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, int deathtyp
                self.solid = SOLID_CORPSE;
                self.ballistics_density = autocvar_g_ballistics_density_corpse;
                // don't stick to the floor
-               self.flags &= ~FL_ONGROUND;
+               UNSET_ONGROUND(self);
                // dying animation
                self.deadflag = DEAD_DYING;
 
@@ -660,7 +660,6 @@ int Say(entity source, float teamsay, entity privatesay, string msgin, bool floo
        string msgstr, colorstr, cmsgstr, namestr, fullmsgstr, sourcemsgstr, fullcmsgstr, sourcecmsgstr, colorprefix;
        float flood;
        var .float flood_field;
-       entity head;
        float ret;
        string privatemsgprefix = string_null; float privatemsgprefixlen = 0;
 
@@ -905,10 +904,7 @@ int Say(entity source, float teamsay, entity privatesay, string msgin, bool floo
                {
                        sprint(source, sourcemsgstr);
                        dedicated_print(msgstr); // send to server console too
-                       FOR_EACH_REALCLIENT(head)
-                               if(head != source)
-                               if(head.active_minigame == source.active_minigame)
-                                       sprint(head, msgstr);
+                       FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != source && it.active_minigame == source.active_minigame, LAMBDA(sprint(it, msgstr)));
                }
                else if(teamsay > 0) // team message, only sent to team mates
                {
@@ -916,29 +912,23 @@ int Say(entity source, float teamsay, entity privatesay, string msgin, bool floo
                        dedicated_print(msgstr); // send to server console too
                        if(sourcecmsgstr != "")
                                centerprint(source, sourcecmsgstr);
-                       FOR_EACH_REALPLAYER(head) if(head.team == source.team)
-                               if(head != source)
-                               {
-                                       sprint(head, msgstr);
-                                       if(cmsgstr != "")
-                                               centerprint(head, cmsgstr);
-                               }
+                       FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && it != source && it.team == source.team, LAMBDA(
+                               sprint(it, msgstr);
+                               if(cmsgstr != "")
+                                       centerprint(it, cmsgstr);
+                       ));
                }
                else if(teamsay < 0) // spectator message, only sent to spectators
                {
                        sprint(source, sourcemsgstr);
                        dedicated_print(msgstr); // send to server console too
-                       FOR_EACH_REALCLIENT(head) if (!IS_PLAYER(head))
-                               if(head != source)
-                                       sprint(head, msgstr);
+                       FOREACH_CLIENT(!IS_PLAYER(it) && IS_REAL_CLIENT(it) && it != source, LAMBDA(sprint(it, msgstr)));
                }
                else if(sourcemsgstr != msgstr) // trimmed/server fixed message, sent to all players
                {
                        sprint(source, sourcemsgstr);
                        dedicated_print(msgstr); // send to server console too
-                       FOR_EACH_REALCLIENT(head)
-                               if(head != source)
-                                       sprint(head, msgstr);
+                       FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != source, LAMBDA(sprint(it, msgstr)));
                }
                else
                        bprint(msgstr); // entirely normal message, sent to all players -- bprint sends to server console too.