]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Entcs: fix tag above teammates disappearing if they aren't in my pvs and their health...
authorterencehill <piuntn@gmail.com>
Fri, 22 Jan 2021 14:03:42 +0000 (15:03 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 22 Jan 2021 14:03:42 +0000 (15:03 +0100)
qcsrc/common/ent_cs.qc

index a6f39e213a79fef4c373dc52304402d2c442afe4..3d9127cbb5029af38ab53079f7ad1ed0f3345925 100644 (file)
@@ -211,11 +211,19 @@ ENTCS_PROP(SOLID, true, sv_solid, solid, ENTCS_SET_NORMAL,
                        it.m_set(this, player);
                        this.SendFlags |= BIT(it.m_id);
                });
+
                if (intermission_running)
                {
                        // health is set to special values after the game ends, ignore any change
                        this.SendFlags &= ~BIT(ENTCS_PROP_HEALTH_id);
                }
+
+               // always send origin of players even if they stand still otherwise
+               // if a teammate isn't in my pvs and his health (or view angle or name
+               // etc...) changes then his tag disappears
+               if (IS_PLAYER(this.owner))
+                       this.SendFlags |= BIT(ENTCS_PROP_ORIGIN_id);
+
                setorigin(this, this.origin); // relink
        }