Guest User

Untitled

a guest
Jul 16th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. if (mcnk[i].NormalOffset > 0)
  2. {
  3. size = 0x1C0;
  4. long curPos = reader.BaseStream.Position;
  5.  
  6. reader.Seek(mcnkOffsets[i].Mcnk + mcnk[i].NormalOffset + 8);
  7. for (int h = 0; h < 145; h++)
  8. {
  9. float x = (int)reader.ReadByte() - 127;
  10. float z = (int)reader.ReadByte() - 127;
  11. float y = (int)reader.ReadByte() - 127;
  12.  
  13. mapIndinces.Normals[h] = new Vector3(x, y, z);
  14. }
  15.  
  16. reader.Seek(curPos);
  17.  
  18. for (int k = 0; k < 145 * 3; k++)
  19. {
  20. mapIndinces.RawNormals[k] = (int)reader.ReadByte() - 127;
  21. }
  22. }
Add Comment
Please, Sign In to add comment