private void svc_serverinfo(BitBuffer bb) { var version = bb.ReadInt16(); bb.ReadInt32(); bb.ReadBoolean(); bb.ReadBoolean(); bb.ReadInt32(); bb.ReadInt16(); if (version < 18) { bb.ReadBits(32); } else { bb.ReadInt32(); bb.ReadInt32(); bb.ReadInt32(); bb.ReadInt32(); } bb.ReadByte(); bb.ReadByte(); bb.ReadSingle(); bb.ReadByte(); bb.ReadString(); bb.ReadString(); bb.ReadString(); bb.ReadString(); }
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); }
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); }
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); }