示例#1
0
        private static bool PositionUpdateIsTooOld(VesselPositionUpdate update)
        {
            var maxInterpolationTime = WarpSystem.Singleton.SubspaceIsEqualOrInThePast(update.SubspaceId) ?
                                       TimeSpan.FromMilliseconds(SettingsSystem.ServerSettings.SecondaryVesselUpdatesMsInterval).TotalSeconds * 2
                : double.MaxValue;

            return(update.GameTimeStamp < TimeSyncSystem.UniversalTime - maxInterpolationTime);
        }
        public void CopyFrom(VesselPositionUpdate update)
        {
            VesselId          = update.VesselId;
            BodyIndex         = update.BodyIndex;
            SubspaceId        = update.SubspaceId;
            HeightFromTerrain = update.HeightFromTerrain;
            Landed            = update.Landed;
            Splashed          = update.Splashed;
            GameTimeStamp     = update.GameTimeStamp;
            HackingGravity    = update.HackingGravity;

            Array.Copy(update.SrfRelRotation, SrfRelRotation, 4);
            Array.Copy(update.LatLonAlt, LatLonAlt, 3);
            Array.Copy(update.VelocityVector, VelocityVector, 3);
            Array.Copy(update.NormalVector, NormalVector, 3);
            Array.Copy(update.Orbit, Orbit, 8);
        }
 private static bool PositionUpdateIsTooOld(VesselPositionUpdate update)
 {
     return(update.GameTimeStamp < TimeSyncSystem.UniversalTime - VesselCommon.PositionAndFlightStateMessageOffsetSec(update.PingMs));
 }