aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Framework/Types/PrimData.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim.Framework/Types/PrimData.cs35
1 files changed, 20 insertions, 15 deletions
diff --git a/OpenSim.Framework/Types/PrimData.cs b/OpenSim.Framework/Types/PrimData.cs
index 9b41a12..6c9bb83 100644
--- a/OpenSim.Framework/Types/PrimData.cs
+++ b/OpenSim.Framework/Types/PrimData.cs
@@ -11,20 +11,20 @@ namespace OpenSim.Framework.Types
11 11
12 public LLUUID OwnerID; 12 public LLUUID OwnerID;
13 public byte PCode; 13 public byte PCode;
14 public byte PathBegin; 14 public ushort PathBegin;
15 public byte PathEnd; 15 public ushort PathEnd;
16 public byte PathScaleX; 16 public byte PathScaleX;
17 public byte PathScaleY; 17 public byte PathScaleY;
18 public byte PathShearX; 18 public byte PathShearX;
19 public byte PathShearY; 19 public byte PathShearY;
20 public sbyte PathSkew; 20 public sbyte PathSkew;
21 public byte ProfileBegin; 21 public ushort ProfileBegin;
22 public byte ProfileEnd; 22 public ushort ProfileEnd;
23 public LLVector3 Scale; 23 public LLVector3 Scale;
24 public byte PathCurve; 24 public byte PathCurve;
25 public byte ProfileCurve; 25 public byte ProfileCurve;
26 public uint ParentID = 0; 26 public uint ParentID = 0;
27 public byte ProfileHollow; 27 public ushort ProfileHollow;
28 public sbyte PathRadiusOffset; 28 public sbyte PathRadiusOffset;
29 public byte PathRevolutions; 29 public byte PathRevolutions;
30 public sbyte PathTaperX; 30 public sbyte PathTaperX;
@@ -58,20 +58,20 @@ namespace OpenSim.Framework.Types
58 58
59 this.OwnerID = new LLUUID(data, i); i += 16; 59 this.OwnerID = new LLUUID(data, i); i += 16;
60 this.PCode = data[i++]; 60 this.PCode = data[i++];
61 this.PathBegin = data[i++]; 61 this.PathBegin = (ushort)(data[i++] + (data[i++] << 8));
62 this.PathEnd = data[i++]; 62 this.PathEnd = (ushort)(data[i++] + (data[i++] << 8));
63 this.PathScaleX = data[i++]; 63 this.PathScaleX = data[i++];
64 this.PathScaleY = data[i++]; 64 this.PathScaleY = data[i++];
65 this.PathShearX = data[i++]; 65 this.PathShearX = data[i++];
66 this.PathShearY = data[i++]; 66 this.PathShearY = data[i++];
67 this.PathSkew = (sbyte)data[i++]; 67 this.PathSkew = (sbyte)data[i++];
68 this.ProfileBegin = data[i++]; 68 this.ProfileBegin = (ushort)(data[i++] + (data[i++] << 8));
69 this.ProfileEnd = data[i++]; 69 this.ProfileEnd = (ushort)(data[i++] + (data[i++] << 8));
70 this.Scale = new LLVector3(data, i); i += 12; 70 this.Scale = new LLVector3(data, i); i += 12;
71 this.PathCurve = data[i++]; 71 this.PathCurve = data[i++];
72 this.ProfileCurve = data[i++]; 72 this.ProfileCurve = data[i++];
73 this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 73 this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
74 this.ProfileHollow = data[i++]; 74 this.ProfileHollow = (ushort)(data[i++] + (data[i++] << 8));
75 this.PathRadiusOffset = (sbyte)data[i++]; 75 this.PathRadiusOffset = (sbyte)data[i++];
76 this.PathRevolutions = data[i++]; 76 this.PathRevolutions = data[i++];
77 this.PathTaperX = (sbyte)data[i++]; 77 this.PathTaperX = (sbyte)data[i++];
@@ -100,15 +100,19 @@ namespace OpenSim.Framework.Types
100 byte[] bytes = new byte[121 + Texture.Length]; 100 byte[] bytes = new byte[121 + Texture.Length];
101 Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16; 101 Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16;
102 bytes[i++] = this.PCode; 102 bytes[i++] = this.PCode;
103 bytes[i++] = this.PathBegin; 103 bytes[i++] = (byte)(this.PathBegin % 256);
104 bytes[i++] = this.PathEnd; 104 bytes[i++] = (byte)((this.PathBegin >> 8) % 256);
105 bytes[i++] = (byte)(this.PathEnd % 256);
106 bytes[i++] = (byte)((this.PathEnd >> 8) % 256);
105 bytes[i++] = this.PathScaleX; 107 bytes[i++] = this.PathScaleX;
106 bytes[i++] = this.PathScaleY; 108 bytes[i++] = this.PathScaleY;
107 bytes[i++] = this.PathShearX; 109 bytes[i++] = this.PathShearX;
108 bytes[i++] = this.PathShearY; 110 bytes[i++] = this.PathShearY;
109 bytes[i++] = (byte)this.PathSkew; 111 bytes[i++] = (byte)this.PathSkew;
110 bytes[i++] = this.ProfileBegin; 112 bytes[i++] = (byte)(this.ProfileBegin % 256);
111 bytes[i++] = this.ProfileEnd; 113 bytes[i++] = (byte)((this.ProfileBegin >> 8) % 256);
114 bytes[i++] = (byte)(this.ProfileEnd % 256);
115 bytes[i++] = (byte)((this.ProfileEnd >> 8) % 256);
112 Array.Copy(Scale.GetBytes(), 0, bytes, i, 12); i += 12; 116 Array.Copy(Scale.GetBytes(), 0, bytes, i, 12); i += 12;
113 bytes[i++] = this.PathCurve; 117 bytes[i++] = this.PathCurve;
114 bytes[i++] = this.ProfileCurve; 118 bytes[i++] = this.ProfileCurve;
@@ -116,7 +120,8 @@ namespace OpenSim.Framework.Types
116 bytes[i++] = (byte)((ParentID >> 8) % 256); 120 bytes[i++] = (byte)((ParentID >> 8) % 256);
117 bytes[i++] = (byte)((ParentID >> 16) % 256); 121 bytes[i++] = (byte)((ParentID >> 16) % 256);
118 bytes[i++] = (byte)((ParentID >> 24) % 256); 122 bytes[i++] = (byte)((ParentID >> 24) % 256);
119 bytes[i++] = this.ProfileHollow; 123 bytes[i++] = (byte)(this.ProfileHollow %256);
124 bytes[i++] = (byte)((this.ProfileHollow >> 8)% 256);
120 bytes[i++] = ((byte)this.PathRadiusOffset); 125 bytes[i++] = ((byte)this.PathRadiusOffset);
121 bytes[i++] = this.PathRevolutions; 126 bytes[i++] = this.PathRevolutions;
122 bytes[i++] = ((byte) this.PathTaperX); 127 bytes[i++] = ((byte) this.PathTaperX);