Example #1
0
        private void svc_gameeventlist(BitBuffer bb)
        {
            bb.ReadBits(MAX_EVENT_BITS);
            var b = (int)bb.ReadUnsignedBits(20);

            bb.SeekBits(b);
        }
Example #2
0
        private void svc_tempentities(BitBuffer bb)
        {
            bb.ReadBits(8);
            var b = (int)bb.ReadUnsignedBits(17);

            bb.SeekBits(b);
        }
Example #3
0
        private void svc_menu(BitBuffer bb)
        {
            bb.ReadBits(16);
            var b = (int)bb.ReadUnsignedBits(16);

            bb.SeekBits(b << 3);
        }
Example #4
0
        private void svc_usermessage(BitBuffer bb)
        {
            bb.ReadBits(8);
            var b = (int)bb.ReadUnsignedBits(11);

            bb.SeekBits(b);
        }
Example #5
0
        private void svc_sendtable(BitBuffer bb)
        {
            bb.ReadBoolean();
            var n = (int)bb.ReadUnsignedBits(16);

            bb.SeekBits(n);
        }
Example #6
0
        private void svc_entitymessage(BitBuffer bb)
        {
            bb.ReadUnsignedBits(MAX_EDICT_BITS);
            bb.ReadBits(MAX_SERVER_CLASS_BITS);
            var b = (int)bb.ReadUnsignedBits(11);

            bb.SeekBits(b);
        }
Example #7
0
        private void svc_sounds(BitBuffer bb)
        {
            var r      = bb.ReadBoolean();
            var sounds = r ? 1 : bb.ReadBits(8);
            var b      = r ? (int)bb.ReadUnsignedBits(8) : (int)bb.ReadUnsignedBits(16);

            bb.SeekBits(b);
        }
Example #8
0
        private void svc_voicedata(BitBuffer bb)
        {
            bb.ReadBits(8);
            bb.ReadBits(8);
            var b = (int)bb.ReadUnsignedBits(16);

            bb.SeekBits(b);
        }
Example #9
0
        private void svc_updatestringtable(BitBuffer bb)
        {
            bb.ReadBits(5);
            var sound = (bb.ReadBoolean() ? bb.ReadBits(16) : 1);
            var b     = (int)bb.ReadUnsignedBits(20);

            bb.SeekBits(b);
        }
Example #10
0
        private void svc_createstringtable(BitBuffer bb)
        {
            bb.ReadString();             // table name;
            var m = bb.ReadBits(16);     // max entries

            bb.SeekBits((int)Math.Log(m, 2) + 1);
            var n = bb.ReadBits(20);             // Length in bits
            var f = bb.ReadBoolean();            // fixed size?

            if (f)
            {
                bb.ReadBits(12);                // size
                bb.ReadBits(4);                 // bits
            }

            bb.ReadBoolean();             // compressed
            bb.SeekBits(n);
        }
Example #11
0
        private static bool IsSoundReliable(BitBuffer bb)
        {
            var r      = bb.ReadBoolean();
            var sounds = r ? 1 : bb.ReadBits(8);
            var b      = r ? (int)bb.ReadUnsignedBits(8) : (int)bb.ReadUnsignedBits(16);

            bb.SeekBits(b);

            return(r);
        }
Example #12
0
        private void svc_packetentities(BitBuffer bb)
        {
            bb.ReadBits(MAX_EDICT_BITS);
            var isDelta = bb.ReadBoolean();
            int deltaTick;

            if (isDelta)
            {
                deltaTick = bb.ReadInt32();
            }
            bool baseline = bb.ReadBoolean();             // Is baseline?

            bb.ReadBits(MAX_EDICT_BITS);
            var b = (int)bb.ReadUnsignedBits(DELTASIZE_BITS);

            bb.ReadBoolean();
            bb.SeekBits(b);
        }
Example #13
0
        private static int GetDeltaTick(BitBuffer bb)
        {
            bb.ReadBits(MAX_EDICT_BITS);
            var isDelta = bb.ReadBoolean();

            if (isDelta)
            {
                return(bb.ReadInt32());
            }
            bool baseline = bb.ReadBoolean();             // Is baseline?

            bb.ReadBits(MAX_EDICT_BITS);
            var b = (int)bb.ReadUnsignedBits(DELTASIZE_BITS);

            bb.ReadBoolean();
            bb.SeekBits(b);

            return(-1);
        }
Example #14
0
        private static bool IsDeltaBaseline(BitBuffer bb)
        {
            bb.ReadBits(MAX_EDICT_BITS);
            var isDelta   = bb.ReadBoolean();
            int deltaFrom = -1;

            if (isDelta)
            {
                deltaFrom = bb.ReadInt32();
            }
            bool baseline = bb.ReadBoolean();             // Is baseline?

            bb.ReadBits(MAX_EDICT_BITS);
            var b = (int)bb.ReadUnsignedBits(DELTASIZE_BITS);

            bb.ReadBoolean();
            bb.SeekBits(b);

            return(baseline);
        }
Example #15
0
        private void svc_cmdkeyvalues(BitBuffer bb)
        {
            var b = (int)bb.ReadUnsignedBits(32);

            bb.SeekBits(b);
        }
Example #16
0
        private void svc_gameevent(BitBuffer bb)
        {
            var b = (int)bb.ReadUnsignedBits(11);

            bb.SeekBits(b);
        }