protected override void OnEntityUpdated(NetEntity entity, int remoteTick, double remoteTime)
        {
            if (entity.EntityGameObject &&
                entity.OriginOrRotationChanged)
            {
                //var rt = (Game.Network as ClientSocketManager).GetLocalTick(remoteTick);
                var time = (Game.Network as ClientSocketManager).GetLocalTime((float)remoteTime);

                var nextFrame = new EntityFrame()
                {
                    CurTime  = time,
                    Position = entity.Origin,
                    Angles   = entity.Angles
                };

                _history[entity].AddFrame(nextFrame);

                entity.OriginOrRotationChanged = false;
            }
        }
Beispiel #2
0
 public void AddFrame(EntityFrame frame)
 {
     _frames.PushFront(frame);
 }