Example #1
0
        public void OnStartInterpolate(Frame frame, bool lateArrival = false, bool midTeleport = false)
        {
            // Don't apply the transform for frame offtick updates. Those are for teleports and weapon fire.
            //TODO: Likely no longer needed, frame 0 shoud only fire onrcv
            //if (frame.frameid == 0)// && !frame.updateType.IsTeleport())
            //	return;

            for (int eid = 0; eid < elementCount; ++eid)
            {
                TransformElement te = transformElements[eid];
                // Don't overwrite mid interpolation if this is a teleport override element, and we are mid teleport.
                if (lateArrival && midTeleport && te.teleportOverride)
                {
                    continue;
                }

                // Don't modify elements with late arriving data if it is null.
                if (lateArrival && te.frames[frame.frameid].xform.type == XType.NULL)
                {
                    DebugX.Log(!DebugX.logInfo ? null :
                               (Time.time + " <b>Null Late Arrival - NOTE if you keep seeing this davin - remove this test otherwise </b> " + te.snapshotFrameId + " " + te.targetFrameId));

                    continue;
                }

                te.Snapshot(frame, lateArrival, midTeleport);
            }
        }
Example #2
0
        public void OnStartInterpolate(Frame frame, bool lateArrival = false, bool midTeleport = false)
        {
            // Don't apply the transform for frame 0 updates. Those are for teleports and weapon fire.
            if (frame.frameid == 0)            // && !frame.updateType.IsTeleport())
            {
                return;
            }

            for (int eid = 0; eid < transformElements.Length; eid++)
            {
                TransformElement te = transformElements[eid];
                // Don't overwrite mid interpolation if this is a teleport override element, and we are mid teleport.
                if (lateArrival && midTeleport && te.teleportOverride)
                {
                    continue;
                }

                // Don't modify elements with late arriving data if it is null.
                if (lateArrival && frame.elements[eid].transform.type == XType.NULL)
                {
                    DebugX.Log(!DebugX.logInfo ? "" :
                               (Time.time + " <b>Null Late Arrival - NOTE if you keep seeing this davin - remove this test otherwise </b> " + te.snapshot + " " + te.target));

                    continue;
                }

                te.Snapshot(frame, lateArrival, midTeleport);
            }
        }