internal void ReadDefinePartPacket( NetReader reader ) { ushort partId = reader.ReadUInt16(); byte type = reader.ReadUInt8(); Vector3 min = ReadS16Vec3( reader ); Vector3 max = ReadS16Vec3( reader ); }
internal void ReadRotationPacket( NetReader reader ) { ushort partId = reader.ReadUInt16(); byte order = reader.ReadUInt8(); RotateData rotX = ReadRotateData( reader ); RotateData rotY = ReadRotateData( reader ); RotateData rotZ = ReadRotateData( reader ); }
internal void ReadMetadataPacket( NetReader reader ) { collisonSize = ReadS16Vec3( reader ); pickingBounds.Min = ReadS16Vec3( reader ); pickingBounds.Max = ReadS16Vec3( reader ); nameYOffset = reader.ReadInt16() / 256f; eyeY = reader.ReadInt16() / 256f; bobbing = reader.ReadUInt8() != 0; }
RotateData ReadRotateData( NetReader reader ) { RotateData data = default(RotateData); data.Origin = reader.ReadInt16() / 256f; data.Type = reader.ReadUInt8(); data.VarA = reader.ReadInt16() / 512f; data.VarB = reader.ReadInt16() / 512f; return data; }