Created
July 6, 2011 04:18
-
-
Save LordJZ/1066553 to your computer and use it in GitHub Desktop.
CMovementStatus read at OBJECT_UPDATE as of 4.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void Read(StreamHandler Reader) | |
| { | |
| var bits = new BitReader(Reader); | |
| this.Flags = (MovementFlags)bits.ReadInt(30); | |
| this.Flags2 = (MovementFlags2)bits.ReadSmallInt(12); | |
| if (HaveTransportData = bits.ReadBit()) | |
| { | |
| HaveTransportTime2 = bits.ReadBit(); | |
| HaveTransportTime3 = bits.ReadBit(); | |
| } | |
| HavePitch = bits.ReadBit(); | |
| if (HaveFallData = bits.ReadBit()) | |
| HaveFallDirection = bits.ReadBit(); | |
| HaveSplineElevation = bits.ReadBit(); | |
| UnknownBool = bits.ReadBit(); | |
| this.Guid = Reader.ReadGuid(); | |
| TimeStamp = Reader.ReadUInt32(); | |
| Position = Reader.ReadStruct<Vector4>(); | |
| if (HaveTransportData) | |
| { | |
| TransportGuid = Reader.ReadGuid(); | |
| TransportPosition = Reader.ReadStruct<Vector3>(); | |
| TransportFacing = Reader.ReadSingle(); | |
| TransportSeat = Reader.ReadByte(); | |
| TransportTime = Reader.ReadUInt32(); | |
| if (HaveTransportTime2) | |
| TransportTime2 = Reader.ReadUInt32(); | |
| if (HaveTransportTime3) | |
| TransportTime3 = Reader.ReadUInt32(); | |
| } | |
| if (HavePitch) | |
| Pitch = Reader.ReadSingle(); | |
| if (HaveFallData) | |
| { | |
| FallTime = Reader.ReadUInt32(); | |
| FallVerticalSpeed = Reader.ReadSingle(); | |
| if (HaveFallDirection) | |
| { | |
| FallCosAngle = Reader.ReadSingle(); | |
| FallSinAngle = Reader.ReadSingle(); | |
| FallHorizontalSpeed = Reader.ReadSingle(); | |
| } | |
| } | |
| if (HaveSplineElevation) | |
| SplineElevation = Reader.ReadSingle(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment