Exemple #1
0
        /// <summary>
        /// This is the logic for when a frame must be sent using info available to all clients/server, so in these cases elements do not need to send a "used" bit
        /// ahead of each element, since an update is required.
        /// </summary>
        protected bool IsUpdateForced(Frame frame)         // UpdateType updateType, int frameid)
        {
            UpdateType updateType   = frame.updateType;
            int        frameid      = frame.frameid;
            bool       hasAuthority = nst.na.HasAuthority;

            return
                (sendCullMask.EveryTick() ||
                 (sendCullMask.OnCustomMsg() && updateType.IsCustom()) ||
                 (sendCullMask.OnTeleport() && updateType.IsTeleport()) ||
                 (sendCullMask.OnRewindCast() && updateType.IsRewindCast()) ||
                 (updateType.IsTeleport() && teleportOverride) ||                // teleport flagged updates must send all teleport elements
                 (frameid != 0 && keyRate != 0 && frameid % keyRate == 0));      // keyrate mod, but not for frame 0, since that is a special case.
        }