]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
entcs: accept updates before game_starttime
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 28 Aug 2016 08:36:21 +0000 (18:36 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 28 Aug 2016 08:36:21 +0000 (18:36 +1000)
qcsrc/common/ent_cs.qc

index 24440b61e1f96556c0ded72c8a7b0d1ef2d4cc0c..dc8a68e31cc97e9c4307cf12919d8e8c1fe1a514 100644 (file)
        {
                entity player = this.owner;
                sf |= BIT(0); // assume private
-               if (IS_PLAYER(to) || to.caplayer) {                                // unless spectating,
-                       bool same_team = (to == player) || (teamplay && player.team == to.team);
-                       if (!same_team && !radar_showennemies) sf &= ENTCS_PUBLICMASK; // no private updates
-               }
+               do {
+                       if (radar_showennemies) break;
+                       if ((to == player) || (teamplay && player.team == to.team)) break;
+                       if (!(IS_PLAYER(to) || to.caplayer) && time > game_starttime) break;
+                       sf &= ENTCS_PUBLICMASK; // no private updates
+               } while (0);
                sf |= this.m_forceupdate;
                this.m_forceupdate = 0;
-               bool valid =
-                       time > game_starttime
-                   && (IS_PLAYER(player)          // player must be active
-                   || player == to)               // player is self
-               ;
-               if (!valid) sf = 0;
                if (chan == MSG_ENTITY)
                        WriteHeader(chan, ENT_CLIENT_ENTCS);
                else