]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
entcs: unset .has_origin when player model leaves PVS
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 20 Nov 2015 05:54:41 +0000 (16:54 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Fri, 20 Nov 2015 05:55:17 +0000 (16:55 +1100)
qcsrc/common/ent_cs.qc
qcsrc/common/ent_cs.qh

index d5dbf51b64ddd76358cae9de3385059cb44b3e74..f90ddddea5742fb0f2ff4bd4ee1a3be5ed77c307 100644 (file)
@@ -9,7 +9,7 @@
        PROP(false, origin, \
        { WriteShort(MSG_ENTITY, this.origin.x);  WriteShort(MSG_ENTITY, this.origin.y); \
          WriteShort(MSG_ENTITY, this.origin.z); }, \
-       { this.has_origin = true; vector v; v.x = ReadShort(); v.y = ReadShort(); v.z = ReadShort(); setorigin(this, v); }) \
+       { this.has_sv_origin = true; vector v; v.x = ReadShort(); v.y = ReadShort(); v.z = ReadShort(); setorigin(this, v); }) \
     \
        PROP(false, angles_y, \
        { WriteByte(MSG_ENTITY, this.angles.y / 360 * 256); }, \
                                this.model = strzone(e.model);
                        }
                }
+               else
+               {
+                       this.has_origin = this.has_sv_origin;
+               }
        }
 
        NET_HANDLE(ENT_CLIENT_ENTCS, bool isnew)
                }
                InterpolateOrigin_Undo();
                int sf = ReadShort();
-               this.has_origin = false;
+               this.has_sv_origin = false;
                this.m_entcs_private = boolean(sf & 1);
                int i = 1;
                #define X(public, fld, sv, cl) { if (sf & BIT(i)) cl; } i += 1;
index c8eea26589e858b2947f978e1680564b723d1f85..1e82e15634fb919a3d9b0b19a71208e3a8ff77ba 100644 (file)
@@ -5,9 +5,10 @@ REGISTER_NET_LINKED(ENT_CLIENT_ENTCS)
 
 /** True when private information such as origin is available */
 .bool m_entcs_private;
-
-/** True when a recent origin is available */
+/** True when origin is available */
 .bool has_origin;
+/** True when a recent server sent origin has been received */
+.bool has_sv_origin;
 
 #ifdef SVQC
 /**